1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/app/scripts/blacklister.js
Dan Finlay 52b92fbe40 Add first version of phishing site warning
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).
2017-07-12 13:09:20 -07:00

14 lines
400 B
JavaScript

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()
})