aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-10-05 06:35:04 +0800
committerDan Finlay <dan@danfinlay.com>2017-10-05 06:35:04 +0800
commit1cba6543a42561c6691736d58f45e97f4832912b (patch)
treeabe458efeddd93d4a06857114f94381f08dd88e6 /app/scripts
parent852c27bad4998fde7ef17135317ea0b10e81b682 (diff)
downloadtangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar.gz
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar.bz2
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar.lz
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar.xz
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.tar.zst
tangerine-wallet-browser-1cba6543a42561c6691736d58f45e97f4832912b.zip
Begin implementing sync injection idea
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/contentscript.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index b4708189e..59e7f08ce 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -7,7 +7,7 @@ const ObjectMultiplex = require('obj-multiplex')
const extension = require('extensionizer')
const PortStream = require('./lib/port-stream.js')
-const inpageText = fs.readFileSync(path.join(__dirname, 'inpage.js')).toString()
+const inpageText = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'scripts', 'inpage.js')).toString() + '//# sourceURL=' + extension.extension.getURL('scripts/inpage.js') + '\n'
// Eventually this streaming injection could be replaced with:
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction
@@ -25,7 +25,6 @@ function setupInjection () {
try {
// inject in-page script
var scriptTag = document.createElement('script')
- scriptTag.src = extension.extension.getURL('scripts/inpage.js')
scriptTag.textContent = inpageText
scriptTag.onload = function () { this.parentNode.removeChild(this) }
var container = document.head || document.documentElement