From 9666eaba668f7b288c42366ba04add951e6aa3b5 Mon Sep 17 00:00:00 2001 From: hahnmichaelf Date: Sun, 12 Aug 2018 18:57:58 -0400 Subject: base - working. fixes #4774 --- app/scripts/contentscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/contentscript.js') 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 } -- cgit From 4808ce25ebdc566a13acbb9cb1c6815368b7c4a1 Mon Sep 17 00:00:00 2001 From: hahnmichaelf Date: Mon, 13 Aug 2018 13:16:37 -0400 Subject: fix for lint-test --- app/scripts/contentscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/contentscript.js') diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 60ef97e5e..b6d5cfe9e 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.hostname + window.location.href = extensionURL + '#' + window.location.hostname } -- cgit From 6ce119d1fbf458fa93c63198da7e5bff3045d955 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 20 Aug 2018 15:39:03 -0700 Subject: Move inpage-provider and port-stream outside With the creation of the [metamask-extension-provider](https://github.com/MetaMask/metamask-extension-provider) we have our first non-core module that is dependent on the inpage-provider and port-stream. To reduce the size of its dependencies, I have moved the [metamask-inpage-provider](https://github.com/MetaMask/metamask-inpage-provider) into its own module, as well as [extension-port-stream](https://github.com/MetaMask/extension-port-stream). This allows them to be more easily depended & iterated on by external projects. --- app/scripts/contentscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/contentscript.js') diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index e0a2b0061..6eee1987a 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -5,7 +5,7 @@ const LocalMessageDuplexStream = require('post-message-stream') const PongStream = require('ping-pong-stream/pong') const ObjectMultiplex = require('obj-multiplex') const extension = require('extensionizer') -const PortStream = require('./lib/port-stream.js') +const PortStream = require('extension-port-stream') const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js')).toString() const inpageSuffix = '//# sourceURL=' + extension.extension.getURL('inpage.js') + '\n' -- cgit From c92fee7771ee1c12729a5a480d63134722332789 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 1 Oct 2018 21:30:40 -0230 Subject: Hook MetaMaskController up with phishing detection page --- app/scripts/contentscript.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/scripts/contentscript.js') diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 2cbfb811e..d870741d6 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -1,6 +1,7 @@ const fs = require('fs') const path = require('path') const pump = require('pump') +const querystring = require('querystring') const LocalMessageDuplexStream = require('post-message-stream') const PongStream = require('ping-pong-stream/pong') const ObjectMultiplex = require('obj-multiplex') @@ -199,5 +200,8 @@ 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.hostname + window.location.href = `${extensionURL}#${querystring.stringify({ + hostname: window.location.hostname, + href: window.location.href, + })}` } -- cgit