2024-05-31 15:55:30 -05:00
|
|
|
<!DOCTYPE html>
|
2024-05-31 16:45:39 -05:00
|
|
|
<script src="https://cdn.jsdelivr.net/gh/Sneed-Group/js-plus-plus@0a6c39513fdc606fb33965fba4acd16b476c620c/jspp.js"></script>
|
2024-05-31 15:55:30 -05:00
|
|
|
<script>
|
2024-05-31 16:06:54 -05:00
|
|
|
const helpers = new JSPlusPlus.General.Helpers
|
2024-05-31 15:55:30 -05: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 16:11:21 -05:00
|
|
|
html.createParagraph("toxicityBool", "Input text to the text box bellow, click the button, and check here if its toxic.")
|
2024-05-31 15:59:26 -05:00
|
|
|
html.createElement("textarea", "textBox1", {width: "80%", placeholder: "input sentence here."})
|
2024-05-31 15:55:30 -05:00
|
|
|
let submit = html.createElement("button", "submit")
|
|
|
|
|
|
|
|
submit.onclick(tox(textBox1.value))
|
|
|
|
</script>
|