aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-11-07 03:26:02 +0800
committerbitpshr <mail@bitpshr.net>2018-11-07 03:26:02 +0800
commitd7b1cacabca6abe55ddea54369e5dcac0dc0963b (patch)
treef1047f0e972452869e0b7addd940925514898732 /app
parent34d80f21e2ed4842d196dc580a9441a2731a5c0e (diff)
downloadtangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar.gz
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar.bz2
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar.lz
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar.xz
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.tar.zst
tangerine-wallet-browser-d7b1cacabca6abe55ddea54369e5dcac0dc0963b.zip
Remove injected script tags after use
Diffstat (limited to 'app')
-rw-r--r--app/scripts/contentscript.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 2327dc4ac..1a10cdb34 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -37,8 +37,10 @@ function injectScript (content) {
try {
const container = document.head || document.documentElement
const scriptTag = document.createElement('script')
+ scriptTag.setAttribute('async', false)
scriptTag.textContent = content
container.insertBefore(scriptTag, container.children[0])
+ container.removeChild(scriptTag)
} catch (e) {
console.error('MetaMask script injection failed', e)
}