From 9666eaba668f7b288c42366ba04add951e6aa3b5 Mon Sep 17 00:00:00 2001 From: hahnmichaelf Date: Sun, 12 Aug 2018 18:57:58 -0400 Subject: [PATCH] base - working. fixes #4774 --- app/phishing.html | 22 ++-------------------- app/scripts/contentscript.js | 2 +- app/scripts/esdb-replace.js | 5 +++++ gulpfile.js | 1 + 4 files changed, 9 insertions(+), 21 deletions(-) create mode 100644 app/scripts/esdb-replace.js diff --git a/app/phishing.html b/app/phishing.html index e20c9ac9c..588e8ea34 100644 --- a/app/phishing.html +++ b/app/phishing.html @@ -25,27 +25,8 @@ a { color: white; } - - - - + @@ -55,6 +36,7 @@

ATTENTION

MetaMask believes this domain could currently compromise your security and has prevented you from interacting with it.

This is because the site tested positive on the Ethereum Phishing Detector. This includes outright malicious websites and legitimate websites that have been compromised by a malicious actor.

+

You can turn MetaMask off to interact with this site, but it is advised not to.

If you think this domain is incorrectly flagged or if a blocked legitimate website has resolved its security issues, please file an issue.

diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index e0a2b0061..60ef97e5e 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -199,5 +199,5 @@ function blacklistedDomainCheck () { function redirectToPhishingWarning () { console.log('MetaMask - routing to Phishing Warning component') const extensionURL = extension.runtime.getURL('phishing.html') - window.location.href = extensionURL + window.location.href = extensionURL + "#" + window.location.hostname } diff --git a/app/scripts/esdb-replace.js b/app/scripts/esdb-replace.js new file mode 100644 index 000000000..ae5991586 --- /dev/null +++ b/app/scripts/esdb-replace.js @@ -0,0 +1,5 @@ +window.onload = function() { + if (window.location.pathname === "/phishing.html") { + document.getElementById("esdbLink").innerHTML = "To read more about this scam, navigate to: https://etherscamdb.info/domain/" + window.location.hash.substring(1) + "" + } +} diff --git a/gulpfile.js b/gulpfile.js index 480f544d8..6dca2c1c9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -267,6 +267,7 @@ const buildJsFiles = [ 'contentscript', 'background', 'ui', + 'esdb-replace' ] // bundle tasks