mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
52b92fbe40
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).
14 lines
400 B
JavaScript
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()
|
|
})
|
|
|