diff options
Diffstat (limited to 'app/scripts/lib/extension-instance.js')
-rw-r--r-- | app/scripts/lib/extension-instance.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/scripts/lib/extension-instance.js b/app/scripts/lib/extension-instance.js index eb3b8a1e9..628b62e3f 100644 --- a/app/scripts/lib/extension-instance.js +++ b/app/scripts/lib/extension-instance.js @@ -42,10 +42,27 @@ function Extension () { } catch (e) {} try { + if (browser[api]) { + _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 |