remove praise function

This commit is contained in:
nelle 2024-07-08 17:00:15 -06:00
parent f7630eaa19
commit 87bb71db05
2 changed files with 0 additions and 101 deletions

View file

@ -12,39 +12,3 @@ function send(message) {
send(ntfyInput.value) send(ntfyInput.value)
ntfyInput.value = "" ntfyInput.value = ""
} }
ntfyInput.addEventListener("keyup", e => e.keyCode == 13 && send())
// send praise
let praiseSentence = document.getElementById("pp-sentence"),
praiseA = document.getElementById("pp-a"),
praiseAdj = document.getElementById("pp-adj"),
praiseNoun = document.getElementById("pp-noun"),
praiseAfter = document.getElementById("pp-after")
resetPraise()
praiseAdj.addEventListener("change", updatePraiseA)
praiseSentence.addEventListener("change", () => {
if (praiseSentence.selectedOptions[0].hasAttribute("data-suffix")) praiseAfter.innerText = praiseSentence.selectedOptions[0].attributes["data-suffix"].value
else praiseAfter.innerText = ""
updatePraiseA()
})
function sendPraise() {
if (praiseAdj.value == "0" || praiseNoun.value == "0") return
text = praiseSentence.selectedOptions[0].innerText
if (text) text += " " + praiseA.innerText + " "
text += praiseAdj.selectedOptions[0].innerText + " " + praiseNoun.selectedOptions[0].innerText
if (praiseAfter.innerText) text += praiseSentence.selectedOptions[0].attributes["data-suffix"].value
send(text)
resetPraise()
}
// praise helpers
function resetPraise() {
praiseSentence.value = "0"
praiseA.innerText = ""
praiseAdj.value = "0"
praiseNoun.value = "0"
praiseAfter.innerText = ""
}
function updatePraiseA() {
if (praiseSentence.value == "0") praiseA.innerText = ""
else if (praiseAdj.selectedOptions[0].hasAttribute("data-mod")) praiseA.innerText = "an"
else praiseA.innerText = "a"
}

View file

@ -69,71 +69,6 @@ import Layout from "../layouts/Layout.astro";
<p>send me a notification! type words and press send</p> <p>send me a notification! type words and press send</p>
<textarea id="ntfy-input" placeholder="Hi Nelle~!"></textarea><a class="ntfy-send nob4" href="javascript:sendNotification()">send</a> <textarea id="ntfy-input" placeholder="Hi Nelle~!"></textarea><a class="ntfy-send nob4" href="javascript:sendNotification()">send</a>
</div> </div>
<!--
<p></p>
<div class="ntfy-box">
...or instead, please praise me!! :3<br>
<select id="pp-sentence">
<option value="0"></option>
<option value="1" data-suffix="?">who's</option>
<option value="2" data-suffix="!">what</option>
<option value="3" data-suffix=" you are">everyone can see what</option>
<option value="4" data-suffix=" don't you?">you love being</option>
<option value="5">nothing but</option>
<option value="6" data-suffix="!">such</option>
<option value="7" data-suffix=" like you...">the things i'd do to</option>
<option value="8" data-suffix=" you can be">show us what</option>
<option value="9">i think you'd make</option>
</select>
<span id="pp-a"></span>
<select id="pp-adj">
<option value="0">-</option>
<option value="1">good</option>
<option value="2">perfect</option>
<option value="3" data-mod="">amazing</option>
<option value="4">sweet</option>
<option value="5">precious</option>
<option value="6">wonderful</option>
<option value="7">charming</option>
<option value="8">lovely</option>
<option value="9">beautiful</option>
<option value="10">pretty</option>
<option value="11">soft</option>
<option value="12">comfy</option>
<option value="13">fluffy</option>
<option value="14">cuddly</option>
<option value="15">silly</option>
<option value="16">cute</option>
<option value="17">slutty</option>
<option value="18">needy</option>
<option value="19" data-mod="">obedient</option>
<option value="20">hopeless</option>
<option value="21" data-mod="">easy</option>
<option value="22">pathetic</option>
<option value="23">naughty</option>
</select>
<select id="pp-noun">
<option value="0">-</option>
<option value="1">girl</option>
<option value="2">pet</option>
<option value="3">mouse</option>
<option value="4">thing</option>
<option value="5">bot</option>
<option value="6">doll</option>
<option value="7">drone</option>
<option value="8">toy</option>
<option value="9">princess</option>
<option value="10">rat</option>
<option value="11">kitty</option>
<option value="12">puppy</option>
<option value="13">bunny</option>
<option value="14">slut</option>
</select>
<span id="pp-after"></span>
<a class="ntfy-send nob4" href="javascript:sendPraise()">send</a>
</div>
-->
</div> </div>
</main> </main>
</Layout> </Layout>