aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2018-07-28 03:23:31 +0800
committerGitHub <noreply@github.com>2018-07-28 03:23:31 +0800
commit1540b5e256634dbbbc01627ca45afe82329d39a9 (patch)
tree418cd22597323816e990577871a6d688fb2133b2 /app
parent6d1808d20909d089df442ed3fa4fb3c6debae01a (diff)
parenta97583b03913a43ef7575546977087cfbaaa9ad7 (diff)
downloadtangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar.gz
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar.bz2
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar.lz
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar.xz
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.tar.zst
tangerine-wallet-browser-1540b5e256634dbbbc01627ca45afe82329d39a9.zip
Merge pull request #4893 from kelvintyb/develop
Move phishing warning to the extension
Diffstat (limited to 'app')
-rw-r--r--app/images/ethereum-metamask-chrome.pngbin0 -> 60022 bytes
-rw-r--r--app/manifest.json3
-rw-r--r--app/phishing.html60
-rw-r--r--app/scripts/contentscript.js5
4 files changed, 65 insertions, 3 deletions
diff --git a/app/images/ethereum-metamask-chrome.png b/app/images/ethereum-metamask-chrome.png
new file mode 100644
index 000000000..0b886babb
--- /dev/null
+++ b/app/images/ethereum-metamask-chrome.png
Binary files differ
diff --git a/app/manifest.json b/app/manifest.json
index 52256c5b7..ed328f19f 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -67,7 +67,8 @@
"notifications"
],
"web_accessible_resources": [
- "inpage.js"
+ "inpage.js",
+ "phishing.html"
],
"externally_connectable": {
"matches": [
diff --git a/app/phishing.html b/app/phishing.html
new file mode 100644
index 000000000..86f2985cc
--- /dev/null
+++ b/app/phishing.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML>
+
+<html>
+
+ <head>
+ <title>Phishing Warning</title>
+
+ <style>
+body {
+ background: #c50000;
+ padding: 50px;
+ display: flex;
+ justify-content: center;
+ font-family: sans-serif;
+}
+.centered {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ color: white;
+ max-width: 600px;
+}
+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>
+
+ </head>
+
+ <body>
+ <div class="centered">
+
+ <img src="/images/ethereum-metamask-chrome.png" style="width:100%">
+ <h3>ATTENTION</h3>
+ <p>MetaMask believes this domain to have malicious intent 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>.</p>
+ <p>You can turn MetaMask off to interact with this site, but it's advised not to.</p>
+ <p>If you think this domain is incorrectly flagged, <a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.</p>
+
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 7b7114c35..b7496f318 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -197,6 +197,7 @@ function blacklistedDomainCheck () {
* Redirects the current page to a phishing information page
*/
function redirectToPhishingWarning () {
- console.log('MetaMask - redirecting to phishing warning')
- window.location.href = 'https://metamask.io/phishing.html'
+ console.log('MetaMask - routing to Phishing Warning component')
+ let extensionURL = extension.runtime.getURL('phishing.html')
+ window.location.href = extensionURL
}