aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-03-23 06:55:01 +0800
committerGitHub <noreply@github.com>2017-03-23 06:55:01 +0800
commitaf9d782363dd3765d1ba529e7afb8944fb2e7153 (patch)
treede2872bc8e0c9c21fe941ac363561dabdea3877c /app
parent45cdf6bdea5c05c49ea6f4168115fdd716b30c0a (diff)
parent205161c489af0bd30b019cea6ae1a2bc5079db3e (diff)
downloadtangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar.gz
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar.bz2
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar.lz
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar.xz
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.tar.zst
tangerine-wallet-browser-af9d782363dd3765d1ba529e7afb8944fb2e7153.zip
Merge branch 'master' into i238-kovan
Diffstat (limited to 'app')
-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
}