Links to my own blacklist for now, since I added a package.json for easy importing. We can point at the main 408H repository once this is merged: https://github.com/409H/EtherAddressLookup/pull/24 Redirects detected phishing sites [here](https://metamask.io/phishing.html).feature/default_network_editable
parent
822ebca3eb
commit
52b92fbe40
@ -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