Modify logic for injection conditions.

feature/default_network_editable
Kevin Serrano 8 years ago
parent 327d18855c
commit 9906da86a4
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
  1. 14
      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
}

Loading…
Cancel
Save