diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index d5b8b267b9..1cb21364fc 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -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, diff --git a/files/assets/js/bottom.js b/files/assets/js/bottom.js index c52e2cc5aa..177b3c1407 100644 --- a/files/assets/js/bottom.js +++ b/files/assets/js/bottom.js @@ -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') {