Merge pull request #1768 from MetaMask/AddBlacklist
Add first version of phishing site warningfeature/default_network_editable
commit
f82f8a9fa4
@ -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() |
||||||
|
}) |
||||||
|
|
Loading…
Reference in new issue