Skip to content

Commit

Permalink
Remove onload
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanols committed Jan 12, 2025
1 parent be7b3e2 commit d1c6156
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions JS_Runner/runJs.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
}

async function run(){
logger.innerHTML = ''
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString)
if (!urlParams.has('file')){
Expand Down Expand Up @@ -109,10 +110,7 @@
"Tomato");
});

window.onload = async function(){
logger.innerHTML = ''
await run();
}
await run();

</script>
</head>
Expand Down
6 changes: 2 additions & 4 deletions Orient/generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
return splitToNChunks(box, n)
}

window.update = async function() {
function update() {
let newUrl = getShowerUrl()
const number = Number(numberItems.value)
const secretChunks = getDataChunks(secretText.value, number)
Expand All @@ -55,9 +55,7 @@
}
}

window.onload = async function() {
await update()
}
update()
</script>
</head>
<body>
Expand Down
4 changes: 3 additions & 1 deletion Orient/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
return (new TextDecoder()).decode(msgOut)
}

window.onload = function(){
function run(){
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString)
if (!urlParams.has('D')){
Expand Down Expand Up @@ -79,6 +79,8 @@
codeField.innerText = text
}
}

run()

</script>
</head>
Expand Down

0 comments on commit d1c6156

Please sign in to comment.