commit 80128299922cc1b2140dba6d85309764a49e1964 parent 16175912cafccbccd20e907a41884e55b1674346 Author: Adomas VenĨkauskas <adomas.ven@gmail.com> Date: Mon, 6 Nov 2017 12:35:30 +0200 Ignore translator browserSupport in connectors except bookmarklet Addresses zotero/zotero-connectors#197 Diffstat:
| M | chrome/content/zotero/xpcom/translation/translator.js | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translator.js b/chrome/content/zotero/xpcom/translation/translator.js @@ -91,9 +91,8 @@ Zotero.Translator.prototype.init = function(info) { this.browserSupport = info["browserSupport"] ? info["browserSupport"] : "g"; - var supported = this.browserSupport.indexOf(Zotero.browser) !== -1 && - (!Zotero.isBookmarklet || this.browserSupport.indexOf("b") !== -1 || - /(?:^|; ?)bookmarklet-debug-mode=1(?:$|; ?)/.test(document.cookie)); + var supported = !Zotero.isBookmarklet || this.browserSupport.includes("b") || + /(?:^|; ?)bookmarklet-debug-mode=1(?:$|; ?)/.test(document.cookie); if (supported) { this.runMode = Zotero.Translator.RUN_MODE_IN_BROWSER;