From eddb42fbbe25ef8cb7648ba5da846368f209e2d7 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 1 Dec 2023 17:44:53 +0200 Subject: [PATCH] dataset.action -> dataset.url --- files/assets/js/award_modal.js | 4 ++-- files/assets/js/bottom.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index d5b8b267b..1cb21364f 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 c52e2cc5a..177b3c140 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') {