aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/contentscript.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-03-24 04:46:09 +0800
committerDan Finlay <dan@danfinlay.com>2017-03-24 04:46:09 +0800
commit6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730 (patch)
tree251258045f86bbf97ddef2da9537f5a51cc02795 /app/scripts/contentscript.js
parente7a3330b980b150d4b7eae9c628e4ad2b0a1af34 (diff)
parentb8500d384b3d68b92c246d11a5d008d9635002b4 (diff)
downloadtangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar.gz
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar.bz2
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar.lz
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar.xz
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.tar.zst
tangerine-wallet-browser-6b100163e9a3c2ca614c91d0bbc7f5c4b1a7a730.zip
Merge branch 'i1234-HardGasLimits-BrowserForm' of github.com:MetaMask/metamask-plugin into i1234-HardGasLimits-BrowserForm
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r--app/scripts/contentscript.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index ab64dc9fa..020208ceb 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -69,14 +69,10 @@ function shouldInjectWeb3 () {
}
function isAllowedSuffix (testCase) {
- var prohibitedTypes = ['xml', 'pdf']
- var currentUrl = window.location.href
- var currentRegex
- for (let i = 0; i < prohibitedTypes.length; i++) {
- currentRegex = new RegExp(`\.${prohibitedTypes[i]}$`)
- if (currentRegex.test(currentUrl)) {
- return false
- }
+ const doctype = window.document.doctype
+ if (doctype) {
+ return doctype.name === 'html'
+ } else {
+ return false
}
- return true
}