Skip to content

Commit

Permalink
Attach click event to format box
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriro committed Jun 8, 2024
1 parent aa4f8f2 commit 3e8182a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function func(rand, opts, op, msg) {
el("div", node, "e").textContent = e
}

to.addEventListener("click", onClick, true)
node.addEventListener("click", onClick, true)
if (first) {
to.replaceChild(box = node, first)
} else {
Expand Down Expand Up @@ -552,7 +552,6 @@ function func(rand, opts, op, msg) {
}
}
function formatPlain() {
body.removeEventListener("click", onClick, true)
if (first && first.tagName === "PRE") {
body.innerHTML = ""
body.appendChild(first)
Expand Down

0 comments on commit 3e8182a

Please sign in to comment.