Skip to content

Commit

Permalink
Even less bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jan 16, 2025
1 parent 54f690e commit 38042f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion feincms3_cookiecontrol/static/f3cc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ const initEmbedClickListener = () => {
}

const setInnerHTML = (elm, html) => {
elm.innerHTML = html
elm[sInnerHTML] = html
for (const oldScriptEl of qsa("script", elm)) {
const newScriptEl = d.createElement("script")
const newScriptEl = crel("script")
for (const attr of oldScriptEl.attributes) {
newScriptEl.setAttribute(attr.name, attr.value)
}

const scriptText = d.createTextNode(oldScriptEl.innerHTML)
const scriptText = d.createTextNode(oldScriptEl[sInnerHTML])
newScriptEl.appendChild(scriptText)

oldScriptEl.replaceWith(newScriptEl)
Expand Down

0 comments on commit 38042f5

Please sign in to comment.