Merge pull request #5037 from michael2to3/fix/donottouchxml

Prevent Non-HTML Content-Type inject iframe
This commit is contained in:
Oliver Blanthorn 2025-03-09 11:43:42 +00:00 committed by GitHub
commit e14eae6898
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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