mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Merge pull request #5037 from michael2to3/fix/donottouchxml
Prevent Non-HTML Content-Type inject iframe
This commit is contained in:
commit
e14eae6898
|
|
@ -39,6 +39,12 @@ let enabled = false
|
|||
async function init() {
|
||||
const noiframe = await config.getAsync("noiframe")
|
||||
const notridactyl = await config.getAsync("superignore")
|
||||
|
||||
if (document.contentType.includes("xml")) {
|
||||
logger.info("Content type is xml; aborting iframe injection.")
|
||||
return
|
||||
}
|
||||
|
||||
if (noiframe === "false" && notridactyl !== "true" && !enabled) {
|
||||
hide()
|
||||
document.documentElement.appendChild(cmdline_iframe)
|
||||
|
|
|
|||
Loading…
Reference in a new issue