mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 16:18:07 +01:00
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()
|
||
|
})
|
||
|
|