aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2018-09-27 23:19:06 +0800
committerGitHub <noreply@github.com>2018-09-27 23:19:06 +0800
commit8c3091aa7ad31e41e8f62bd5c0b803de45816b0e (patch)
treef9686232ce512d8598a756f321f1b11b6aca86b4 /app
parentcf6bead7ef1fea81f44abc26e4bf6847b9624d0d (diff)
parente19eb7bc035670d0f05e34840e6565bc1f907de3 (diff)
downloadtangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar.gz
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar.bz2
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar.lz
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar.xz
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.tar.zst
tangerine-wallet-browser-8c3091aa7ad31e41e8f62bd5c0b803de45816b0e.zip
Merge pull request #5053 from hahnmichaelf/esdb-support
Link to ESDB in local phishing.html
Diffstat (limited to 'app')
-rw-r--r--app/phishing.html5
-rw-r--r--app/scripts/contentscript.js2
-rw-r--r--app/scripts/phishing-detect.js5
3 files changed, 9 insertions, 3 deletions
diff --git a/app/phishing.html b/app/phishing.html
index dc8f61a93..eabb363b3 100644
--- a/app/phishing.html
+++ b/app/phishing.html
@@ -25,9 +25,9 @@
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),
@@ -45,7 +45,7 @@
ga('require', 'linker');
ga('linker:autoLink', ['metamask.io'], false, true);
</script>
-
+ <script src="phishing-detect.js"></script>
</head>
<body>
@@ -55,6 +55,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 6eee1987a..2cbfb811e 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/phishing-detect.js b/app/scripts/phishing-detect.js
new file mode 100644
index 000000000..4168b6618
--- /dev/null
+++ b/app/scripts/phishing-detect.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>'
+ }
+}