diff options
-rw-r--r-- | app/scripts/lib/extension-instance.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/scripts/lib/extension-instance.js b/app/scripts/lib/extension-instance.js index 1098130e3..628b62e3f 100644 --- a/app/scripts/lib/extension-instance.js +++ b/app/scripts/lib/extension-instance.js @@ -46,12 +46,23 @@ function Extension () { _this[api] = browser[api] } } catch (e) {} - try { _this.api = browser.extension[api] } catch (e) {} - }) + + try { + if (browser && browser.runtime) { + this.runtime = browser.runtime + } + } catch (e) {} + + try { + if (browser && browser.browserAction) { + this.browserAction = browser.browserAction + } + } catch (e) {} + } module.exports = Extension |