Kill translate.js code that was only necessary because of E4X limitations

This commit is contained in:
Simon Kornblith 2012-07-14 19:00:35 -04:00
parent 136e7879c8
commit 0deb2573cc
2 changed files with 4 additions and 12 deletions

View File

@ -1333,14 +1333,6 @@ Zotero.Translate.Base.prototype = {
if(this instanceof Zotero.Translate.Export || this instanceof Zotero.Translate.Import) {
src += "Zotero.Collection = function () {};"+
"Zotero.Collection.prototype.complete = function() { Zotero._collectionDone(this); };";
if (this instanceof Zotero.Translate.Import) {
// https://bugzilla.mozilla.org/show_bug.cgi?id=609143 - can't pass E4X to sandbox in Fx4
src += "Zotero.getXML = function() {"+
"var xml = Zotero._getXML();"+
"if(typeof xml == 'string') { return new XML(xml);}"+
"return xml;"+
"};";
}
}
if(Zotero.isFx && !Zotero.isBookmarklet) {
@ -2156,7 +2148,7 @@ Zotero.Translate.IO.String.prototype = {
"read":"r",
"write":"r",
"setCharacterSet":"r",
"_getXML":"r"
"getXML":"r"
},
"_initRDF":function(callback) {
@ -2230,7 +2222,7 @@ Zotero.Translate.IO.String.prototype = {
this.contentLength = this.string.length;
},
"_getXML":function() {
"getXML":function() {
try {
var xml = Zotero.Translate.IO.parseDOMXML(this.string);
} catch(e) {

View File

@ -636,7 +636,7 @@ Zotero.Translate.IO.Read = function(file, mode) {
Zotero.Translate.IO.Read.prototype = {
"__exposedProps__":{
"_getXML":"r",
"getXML":"r",
"RDF":"r",
"read":"r",
"setCharacterSet":"r"
@ -730,7 +730,7 @@ Zotero.Translate.IO.Read.prototype = {
return str.value;
},
"_getXML":function() {
"getXML":function() {
if(this.bytesRead !== 0) this._seekToStart(this._charset);
try {
var xml = Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize);