diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-07-13 07:09:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 07:09:11 +0800 |
commit | c6f867ef676d32ec9a80fd982172988efa795e82 (patch) | |
tree | 0987bba049c25ba556456f512fcbe2b09e35ed31 /app | |
parent | eddc8cfee7fa161b0901483998fce868d3cc4077 (diff) | |
parent | f82f8a9fa46d4fe59b0f9a13313a3a55ce120f28 (diff) | |
download | tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar.gz tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar.bz2 tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar.lz tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar.xz tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.tar.zst tangerine-wallet-browser-c6f867ef676d32ec9a80fd982172988efa795e82.zip |
Merge branch 'master' into Version-3.8.6
Diffstat (limited to 'app')
-rw-r--r-- | app/manifest.json | 6 | ||||
-rw-r--r-- | app/scripts/blacklister.js | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/app/manifest.json b/app/manifest.json index 2b1f6d69f..ed1d68190 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -52,6 +52,12 @@ ], "run_at": "document_start", "all_frames": true + }, + { + "run_at": "document_end", + "matches": ["http://*/*", "https://*/*"], + "js": ["scripts/blacklister.js"], + "css": ["css/blacklister.css"] } ], "permissions": [ diff --git a/app/scripts/blacklister.js b/app/scripts/blacklister.js new file mode 100644 index 000000000..a45265a75 --- /dev/null +++ b/app/scripts/blacklister.js @@ -0,0 +1,13 @@ +const blacklistedDomains = require('etheraddresslookup/blacklists/domains.json')
+
+function detectBlacklistedDomain() {
+ var strCurrentTab = window.location.hostname
+ if (blacklistedDomains && blacklistedDomains.includes(strCurrentTab)) {
+ window.location.href = 'https://metamask.io/phishing.html'
+ }
+}
+
+window.addEventListener('load', function() {
+ detectBlacklistedDomain()
+})
+
|