From 80128299922cc1b2140dba6d85309764a49e1964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 6 Nov 2017 12:35:30 +0200 Subject: [PATCH] Ignore translator browserSupport in connectors except bookmarklet Addresses zotero/zotero-connectors#197 --- 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 index a2d4cd127..c7418dd2f 100644 --- 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;