Fix indentation and IE parse error
This commit is contained in:
parent
26f5765c29
commit
b3a2682853
|
@ -1,28 +1,25 @@
|
|||
/* Set up the environment before loading the rest of the files into Zotero */
|
||||
var $rdf = {
|
||||
Util: {
|
||||
ArrayIndexOf: function (arr, item, i) {
|
||||
//supported in all browsers except IE<9
|
||||
return arr.indexOf(item, i);
|
||||
},
|
||||
RDFArrayRemove: function (a, x) { //removes all statements equal to x from a
|
||||
for(var i = 0; i < a.length; i++) {
|
||||
//TODO: This used to be the following, which didnt always work..why
|
||||
//if(a[i] == x)
|
||||
if(a[i].subject.sameTerm(x.subject)
|
||||
&& a[i].predicate.sameTerm(x.predicate)
|
||||
&& a[i].object.sameTerm(x.object)
|
||||
&& a[i].why.sameTerm(x.why)) {
|
||||
a.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw "RDFArrayRemove: Array did not contain " + x;
|
||||
},
|
||||
},
|
||||
log: {
|
||||
debug: Zotero.debug,
|
||||
warn: Zotero.debug
|
||||
Util: {
|
||||
ArrayIndexOf: function (arr, item, i) {
|
||||
//supported in all browsers except IE<9
|
||||
return arr.indexOf(item, i);
|
||||
},
|
||||
RDFArrayRemove: function (a, x) { //removes all statements equal to x from a
|
||||
for (var i = 0; i < a.length; i++) {
|
||||
//TODO: This used to be the following, which didnt always work..why
|
||||
//if(a[i] == x)
|
||||
if (a[i].subject.sameTerm(x.subject) && a[i].predicate.sameTerm(x.predicate) && a[i].object.sameTerm(x.object) && a[i].why.sameTerm(x.why)) {
|
||||
a.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw "RDFArrayRemove: Array did not contain " + x;
|
||||
}
|
||||
},
|
||||
log: {
|
||||
debug: Zotero.debug,
|
||||
warn: Zotero.debug
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user