From 971202f80d5b653f48b53702ee681a60b5b3bbb4 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 2 Feb 2026 06:35:22 +0100 Subject: [PATCH] Fix oninput declaration trigger for gap lines textarea being overwritten by importing script. --- src/templates/edit_structured.js | 19 +++++++++++-------- src/templates/taint.js | 13 ++++++++----- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/templates/edit_structured.js b/src/templates/edit_structured.js index 4e2da3e..1bd52e9 100644 --- a/src/templates/edit_structured.js +++ b/src/templates/edit_structured.js @@ -21,11 +21,11 @@ eslint ], "max-lines": [ "error", - {"max": 373, "skipBlankLines": true, "skipComments": true} + {"max": 376, "skipBlankLines": true, "skipComments": true} ], "max-lines-per-function": [ "error", - 249 + 250 ], "max-params": [ "error", @@ -448,10 +448,13 @@ const fillSink = () => { taintAndUpdateForm(); }; -window.onload = () => { - document.getElementById("btn_mirror").onclick = mirror; - document.getElementById("btn_sink").onclick = fillSink; - document.getElementById("btn_replace").onclick = replace; - updateForm(); -}; +window.addEventListener( + "load", + () => { + document.getElementById("btn_mirror").onclick = mirror; + document.getElementById("btn_sink").onclick = fillSink; + document.getElementById("btn_replace").onclick = replace; + updateForm(); + } +); diff --git a/src/templates/taint.js b/src/templates/taint.js index 92f89dc..59db4b3 100644 --- a/src/templates/taint.js +++ b/src/templates/taint.js @@ -82,9 +82,12 @@ export const taint = () => { forEach((el) => { el.oninput = null; }); }; -window.onload = () => { - Array.from(document.getElementsByClassName("tainter")).forEach( - (el) => { el.oninput = taint; } - ); -}; +window.addEventListener( + "load", + () => { + Array.from(document.getElementsByClassName("tainter")).forEach( + (el) => { el.oninput = taint; } + ); + } +); -- 2.30.2