aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhahnmichaelf <hahn.michael.f@gmail.com>2018-08-13 06:57:58 +0800
committerhahnmichaelf <hahn.michael.f@gmail.com>2018-08-13 06:57:58 +0800
commit9666eaba668f7b288c42366ba04add951e6aa3b5 (patch)
treea3c1258968a7e9d83b76324679bbad947c63ffda
parente2be22a4b722df608cb764042cc8ade6664414d8 (diff)
downloadtangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar.gz
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar.bz2
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar.lz
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar.xz
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.tar.zst
tangerine-wallet-browser-9666eaba668f7b288c42366ba04add951e6aa3b5.zip
base - working. fixes #4774
-rw-r--r--app/phishing.html22
-rw-r--r--app/scripts/contentscript.js2
-rw-r--r--app/scripts/esdb-replace.js5
-rw-r--r--gulpfile.js1
4 files changed, 9 insertions, 21 deletions
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;
}
-
</style>
-
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-37075177-6', 'auto');
- ga('send', 'pageview');
- //Send referral data to EAL
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-68598031-1', 'auto' {'allowLinker':true});
- ga('send', 'pageview');
- ga('require', 'linker');
- ga('linker:autoLink', ['harrydenley.com', 'metamask.io'], false, true);
- </script>
-
+ <script src="esdb-replace.js"></script>
</head>
<body>
@@ -55,6 +36,7 @@
<h3>ATTENTION</h3>
<p>MetaMask believes this domain could currently compromise your security and has prevented you from interacting with it.</p>
<p>This is because the site tested positive on the <a href="https://github.com/metamask/eth-phishing-detect">Ethereum Phishing Detector</a>. This includes outright malicious websites and legitimate websites that have been compromised by a malicious actor.</p>
+ <p id="esdbLink"></p>
<p>You can turn MetaMask off to interact with this site, but it is advised not to.</p>
<p>If you think this domain is incorrectly flagged or if a blocked legitimate website has resolved its security issues, <a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.</p>
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 = "<b>To read more about this scam, navigate to: <a href='https://etherscamdb.info/domain/" + window.location.hash.substring(1) + "'> https://etherscamdb.info/domain/" + window.location.hash.substring(1) + "</a></b>"
+ }
+}
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