|
|
@ -69,14 +69,10 @@ function shouldInjectWeb3 () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function isAllowedSuffix (testCase) { |
|
|
|
function isAllowedSuffix (testCase) { |
|
|
|
var prohibitedTypes = ['xml', 'pdf'] |
|
|
|
const doctype = window.document.doctype |
|
|
|
var currentUrl = window.location.href |
|
|
|
if (doctype) { |
|
|
|
var currentRegex |
|
|
|
return doctype.name === 'html' |
|
|
|
for (let i = 0; i < prohibitedTypes.length; i++) { |
|
|
|
} else { |
|
|
|
currentRegex = new RegExp(`\.${prohibitedTypes[i]}$`) |
|
|
|
return false |
|
|
|
if (currentRegex.test(currentUrl)) { |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|