diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-07-26 04:28:38 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-07-26 04:28:38 +0800 |
commit | f3ea891e727810ba29c6d893f27073e9e11efed2 (patch) | |
tree | 176fcb64f1796df6fe30f9644f0d3019a536afe4 /app | |
parent | 5476cb9a2c37ddff470e46738cb1eb9fb34172b1 (diff) | |
download | tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar.gz tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar.bz2 tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar.lz tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar.xz tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.tar.zst tangerine-wallet-browser-f3ea891e727810ba29c6d893f27073e9e11efed2.zip |
Allow page injection to look for cross-browser APIs appropriately
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/contentscript.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 0ffe93e3c..43c48dd93 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -11,7 +11,8 @@ if (shouldInjectWeb3()) { function setupInjection(){ // inject in-page script var scriptTag = document.createElement('script') - scriptTag.src = extension.extension.getURL('scripts/inpage.js') + var urlGetter = extension.extension || chrome.extension + scriptTag.src = urlGetter.getURL('scripts/inpage.js') scriptTag.onload = function () { this.parentNode.removeChild(this) } var container = document.head || document.documentElement // append as first child |