diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/manifest.json | 7 | ||||
-rw-r--r-- | app/scripts/blacklister.js | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/app/manifest.json b/app/manifest.json index f3a1ebeff..269e88e64 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "3.8.5", + "version": "3.9.0", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", @@ -52,6 +52,11 @@ ], "run_at": "document_start", "all_frames": true + }, + { + "run_at": "document_end", + "matches": ["http://*/*", "https://*/*"], + "js": ["scripts/blacklister.js"] } ], "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()
+})
+
|