Revert "Merge pull request #1243 from glacambre/attempt_fix_1237"

This reverts commit a5e09fd162, reversing
changes made to 815140392b.
This commit is contained in:
Oliver Blanthorn 2018-12-15 21:34:02 +00:00
parent a5e09fd162
commit 5d02dcf280
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -17,23 +17,23 @@ const cmdline_logger = new Logger("cmdline")
// inject the commandline iframe into a content page
let cmdline_iframe = window.document.createElementNS(
"http://www.w3.org/1999/xhtml",
"iframe",
) as HTMLIFrameElement
cmdline_iframe.className = "cleanslate"
cmdline_iframe.setAttribute(
"src",
browser.extension.getURL("static/commandline.html"),
)
cmdline_iframe.setAttribute("id", "cmdline_iframe")
let cmdline_iframe: HTMLIFrameElement = undefined
let enabled = false
/** Initialise the cmdline_iframe element unless the window location is included in a value of config/noiframe */
async function init() {
let noiframe = await config.getAsync("noiframe")
if (noiframe == "false" && !enabled && cmdline_iframe === undefined) {
cmdline_iframe = window.document.createElementNS(
"http://www.w3.org/1999/xhtml",
"iframe",
) as HTMLIFrameElement
cmdline_iframe.className = "cleanslate"
cmdline_iframe.setAttribute(
"src",
browser.extension.getURL("static/commandline.html"),
)
cmdline_iframe.setAttribute("id", "cmdline_iframe")
hide()
document.documentElement.appendChild(cmdline_iframe)
enabled = true