js-plus-plus-toxicity-demo/index.html
2024-05-31 21:30:55 +00:00

20 lines
797 B
HTML

<!DOCTYPE html>
<script src="https://cdn.jsdelivr.net/gh/Sneed-Group/js-plus-plus@f7f25a2c3a29b91e649e65216656321deda27abc/jspp.js"></script>
<script>
const helpers = new JSPlusPlus.General.Helpers
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.")
html.createParagraph("toxicityBool", "Input text to the text box bellow, click the button, and check here if its toxic.")
html.createElement("textarea", "textBox1", {width: "80%", placeholder: "input sentence here."})
let submit = html.createElement("button", "submit")
submit.onclick(tox(textBox1.value))
</script>