|
|
|
@ -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 |
|
|
|
|
} |
|
|
|
|