dataset.action -> dataset.url

master
Aevann 2023-12-01 17:44:53 +02:00
parent dae4b9cbe4
commit eddb42fbbe
2 changed files with 4 additions and 4 deletions

View File

@ -119,7 +119,7 @@ function pick(kind, price, coins, marseybux) {
}
if (kind == "emoji") {
if (giveaward_button.dataset.action.startsWith('/award/post/'))
if (giveaward_button.dataset.url.startsWith('/award/post/'))
document.getElementById('emoji_behavior_section').classList.remove("d-none")
document.getElementById('note').setAttribute("style", "min-height:35px;max-height:35px;height:35px;min-width:min(300px,80vw)")
gif_button.classList.add('d-none')
@ -170,7 +170,7 @@ function giveaward(t) {
const note_id = (kind == "chud" ? "chud_phrase" : "note")
postToast(t, t.dataset.action,
postToast(t, t.dataset.url,
{
"kind": kind,
"note": document.getElementById(note_id).value,

View File

@ -188,8 +188,8 @@ document.addEventListener("click", function (e) {
console.log("Nonce check failed!")
return
}
document.getElementById('giveaward').dataset.action = element.dataset.url
document.getElementById('buyandgiveaward').dataset.action = element.dataset.url
document.getElementById('giveaward').dataset.url = element.dataset.url
document.getElementById('buyandgiveaward').dataset.url = element.dataset.url
const currently_picked = document.getElementById("awardModal").getElementsByClassName('picked')[0]
if (currently_picked && currently_picked.id == 'emoji') {