зеркало из https://github.com/mozilla/pjs.git
429151, r=sayrer, a=beltzner, don't do internal version checking when adding microformats
This commit is contained in:
Родитель
a293fa0887
Коммит
15d7bc44a6
|
@ -1,7 +1,6 @@
|
||||||
var EXPORTED_SYMBOLS = ["Microformats", "adr", "tag", "hCard", "hCalendar", "geo"];
|
var EXPORTED_SYMBOLS = ["Microformats", "adr", "tag", "hCard", "hCalendar", "geo"];
|
||||||
|
|
||||||
var Microformats = {
|
var Microformats = {
|
||||||
version: 0.8,
|
|
||||||
/* When a microformat is added, the name is placed in this list */
|
/* When a microformat is added, the name is placed in this list */
|
||||||
list: [],
|
list: [],
|
||||||
/* Custom iterator so that microformats can be enumerated as */
|
/* Custom iterator so that microformats can be enumerated as */
|
||||||
|
@ -267,16 +266,14 @@ var Microformats = {
|
||||||
},
|
},
|
||||||
add: function add(microformat, microformatDefinition) {
|
add: function add(microformat, microformatDefinition) {
|
||||||
/* We always replace an existing definition with the new one */
|
/* We always replace an existing definition with the new one */
|
||||||
if (microformatDefinition.mfVersion == Microformats.version) {
|
if (!Microformats[microformat]) {
|
||||||
if (!Microformats[microformat]) {
|
Microformats.list.push(microformat);
|
||||||
Microformats.list.push(microformat);
|
|
||||||
}
|
|
||||||
Microformats[microformat] = microformatDefinition;
|
|
||||||
microformatDefinition.mfObject.prototype.debug =
|
|
||||||
function(microformatObject) {
|
|
||||||
return Microformats.debug(microformatObject)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Microformats[microformat] = microformatDefinition;
|
||||||
|
microformatDefinition.mfObject.prototype.debug =
|
||||||
|
function(microformatObject) {
|
||||||
|
return Microformats.debug(microformatObject)
|
||||||
|
};
|
||||||
},
|
},
|
||||||
/* All parser specific functions are contained in this object */
|
/* All parser specific functions are contained in this object */
|
||||||
parser: {
|
parser: {
|
||||||
|
@ -1136,7 +1133,6 @@ adr.prototype.toString = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var adr_definition = {
|
var adr_definition = {
|
||||||
mfVersion: 0.8,
|
|
||||||
mfObject: adr,
|
mfObject: adr,
|
||||||
className: "adr",
|
className: "adr",
|
||||||
properties: {
|
properties: {
|
||||||
|
@ -1203,7 +1199,6 @@ hCard.prototype.toString = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var hCard_definition = {
|
var hCard_definition = {
|
||||||
mfVersion: 0.8,
|
|
||||||
mfObject: hCard,
|
mfObject: hCard,
|
||||||
className: "vcard",
|
className: "vcard",
|
||||||
required: ["fn"],
|
required: ["fn"],
|
||||||
|
@ -1414,7 +1409,6 @@ hCalendar.prototype.toString = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var hCalendar_definition = {
|
var hCalendar_definition = {
|
||||||
mfVersion: 0.8,
|
|
||||||
mfObject: hCalendar,
|
mfObject: hCalendar,
|
||||||
className: "vevent",
|
className: "vevent",
|
||||||
required: ["summary", "dtstart"],
|
required: ["summary", "dtstart"],
|
||||||
|
@ -1623,7 +1617,6 @@ geo.prototype.toString = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var geo_definition = {
|
var geo_definition = {
|
||||||
mfVersion: 0.8,
|
|
||||||
mfObject: geo,
|
mfObject: geo,
|
||||||
className: "geo",
|
className: "geo",
|
||||||
required: ["latitude","longitude"],
|
required: ["latitude","longitude"],
|
||||||
|
@ -1696,7 +1689,6 @@ tag.prototype.toString = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag_definition = {
|
var tag_definition = {
|
||||||
mfVersion: 0.8,
|
|
||||||
mfObject: tag,
|
mfObject: tag,
|
||||||
attributeName: "rel",
|
attributeName: "rel",
|
||||||
attributeValues: "tag",
|
attributeValues: "tag",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче