mirror of
https://github.com/the-spellman/js-plus-plus-toxicity-demo
synced 2024-12-23 09:32:33 -06:00
Update index.html
This commit is contained in:
parent
32ffc33c9a
commit
001a618e17
1 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,9 @@ const helpers = new JSPlusPlus.General.Helpers
|
||||||
const html = new JSPlusPlus.HTMLFrontend
|
const html = new JSPlusPlus.HTMLFrontend
|
||||||
html.initHead("Toxicity Check")
|
html.initHead("Toxicity Check")
|
||||||
html.initBody()
|
html.initBody()
|
||||||
function tox(sentence, p) {
|
function tox() {
|
||||||
|
const sentence = document.getElementById("textBox1").value
|
||||||
|
let p = document.getElementById("toxicityBool")
|
||||||
const objSentence = [sentence]
|
const objSentence = [sentence]
|
||||||
let toxic = helpers.isToxic(objSentence)
|
let toxic = helpers.isToxic(objSentence)
|
||||||
p.innerText = toxic
|
p.innerText = toxic
|
||||||
|
@ -20,5 +22,5 @@ let submit = html.createElement("button", "submit")
|
||||||
|
|
||||||
submit.innerText = "Toxic?" // github pages pls dont bug out now
|
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);
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue