From 001a618e179cfb1c94be63523d8323e75d4f7d06 Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 23:08:50 +0000 Subject: [PATCH] Update index.html --- index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8ec2ea5..2e169d1 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,9 @@ const helpers = new JSPlusPlus.General.Helpers const html = new JSPlusPlus.HTMLFrontend html.initHead("Toxicity Check") html.initBody() -function tox(sentence, p) { +function tox() { +const sentence = document.getElementById("textBox1").value +let p = document.getElementById("toxicityBool") const objSentence = [sentence] let toxic = helpers.isToxic(objSentence) p.innerText = toxic @@ -20,5 +22,5 @@ let submit = html.createElement("button", "submit") submit.innerText = "Toxic?" // github pages pls dont bug out now -submit.addEventListener("click", tox(document.getElementById("textBox1").value, document.getElementById("toxicityBool"))); +submit.addEventListener("click", tox);