diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-02 08:00:40 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-02 21:15:39 +0800 |
commit | c92fee7771ee1c12729a5a480d63134722332789 (patch) | |
tree | 1e779fa686bc94fadeaf8ad74f437da35b2106a2 /app/scripts/contentscript.js | |
parent | 58d856bd84a06228706fce3d2a13348e25f1a4ae (diff) | |
download | tangerine-wallet-browser-c92fee7771ee1c12729a5a480d63134722332789.tar.gz tangerine-wallet-browser-c92fee7771ee1c12729a5a480d63134722332789.tar.zst tangerine-wallet-browser-c92fee7771ee1c12729a5a480d63134722332789.zip |
Hook MetaMaskController up with phishing detection page
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r-- | app/scripts/contentscript.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 2cbfb811e..d870741d6 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -1,6 +1,7 @@ const fs = require('fs') const path = require('path') const pump = require('pump') +const querystring = require('querystring') const LocalMessageDuplexStream = require('post-message-stream') const PongStream = require('ping-pong-stream/pong') const ObjectMultiplex = require('obj-multiplex') @@ -199,5 +200,8 @@ function blacklistedDomainCheck () { function redirectToPhishingWarning () { console.log('MetaMask - routing to Phishing Warning component') const extensionURL = extension.runtime.getURL('phishing.html') - window.location.href = extensionURL + '#' + window.location.hostname + window.location.href = `${extensionURL}#${querystring.stringify({ + hostname: window.location.hostname, + href: window.location.href, + })}` } |