From 89e7d6a1ef0e05c4ed68fd989bdb0c05cac366c4 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 11 Sep 2008 19:40:38 +0000 Subject: [PATCH] don't run translators on about: URIs --- chrome/content/zotero/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index 880d9c7d33..f9a8f78596 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -590,7 +590,7 @@ Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) { } } - if(doc instanceof HTMLDocument) { + if(doc instanceof HTMLDocument && doc.documentURI.substr(0, 6) != "about:") { // get translators var me = this; @@ -598,7 +598,7 @@ Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) { translate.setDocument(doc); translate.setHandler("translators", function(obj, item) { me._translatorsAvailable(obj, item) }); translate.getTranslators(); - } else if(doc.documentURI.length > 7 && doc.documentURI.substr(0, 7) == "file://") { + } else if(doc.documentURI.substr(0, 7) == "file://") { this._attemptLocalFileImport(doc); } }