js-plus-plus-toxicity-demo/index.html

21 lines
816 B
HTML
Raw Normal View History

2024-05-31 20:55:30 +00:00
<!DOCTYPE html>
2024-05-31 22:22:27 +00:00
<script src="https://cdn.jsdelivr.net/gh/Sneed-Group/js-plus-plus@3dffa7e4121cbe8317232b7dab5b847374f62c78/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()
function tox(sentence) {
const objSentence = [sentence]
console.log(helpers.isToxic(objSentence))
}
helpers.consoleUseWarner("DO NOT INPUT ANYTHING HERE UNLESS YOU KNOW WHAT YOU ARE DOING.")
2024-05-31 21:11:21 +00:00
html.createParagraph("toxicityBool", "Input text to the text box bellow, click the button, and check here if its toxic.")
2024-05-31 20:59:26 +00:00
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:24:36 +00:00
submit.addEventListener("click", (tox(textBox1.value))
2024-05-31 20:55:30 +00:00
</script>