2024-05-31 20:55:30 +00:00
|
|
|
<!DOCTYPE html>
|
2024-05-31 22:44:08 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/gh/Sneed-Group/js-plus-plus@24acc782d30c974f94e36da932c7bb49ed212143/jspp.js"></script>
|
2024-05-31 20:55:30 +00:00
|
|
|
<script>
|
2024-05-31 21:06:54 +00:00
|
|
|
const helpers = new JSPlusPlus.General.Helpers
|
2024-05-31 20:55:30 +00:00
|
|
|
const html = new JSPlusPlus.HTMLFrontend
|
|
|
|
html.initHead("Toxicity Check")
|
|
|
|
html.initBody()
|
2024-05-31 22:36:47 +00:00
|
|
|
function tox(sentence, p) {
|
2024-05-31 20:55:30 +00:00
|
|
|
const objSentence = [sentence]
|
2024-05-31 22:36:47 +00:00
|
|
|
let toxic = helpers.isToxic(objSentence)
|
|
|
|
p.innerText = toxic
|
|
|
|
console.log(toxic)
|
2024-05-31 20:55:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
helpers.consoleUseWarner("DO NOT INPUT ANYTHING HERE UNLESS YOU KNOW WHAT YOU ARE DOING.")
|
|
|
|
|
2024-05-31 22:36:47 +00:00
|
|
|
let p = html.createParagraph("toxicityBool", "Input text to the text box bellow, click the button, and check here if its toxic.")
|
|
|
|
let textbox = html.createElement("textarea", "textBox1", {width: "80%", placeholder: "input sentence here."})
|
2024-05-31 20:55:30 +00:00
|
|
|
let submit = html.createElement("button", "submit")
|
|
|
|
|
2024-05-31 22:31:58 +00:00
|
|
|
submit.innerText = "Toxic?" // github pages pls dont bug out now
|
2024-05-31 22:30:18 +00:00
|
|
|
|
2024-05-31 22:44:08 +00:00
|
|
|
submit.addEventListener("click", tox(document.getElementById("textBox1").value, document.getElementById("toxicityBool")));
|
2024-05-31 20:55:30 +00:00
|
|
|
</script>
|