forked from rDrama/rDrama
add nonce check to all areyousure stuff
parent
36564af2cd
commit
41418f9129
|
@ -238,6 +238,10 @@ document.addEventListener("click", function (e) {
|
|||
}
|
||||
|
||||
if (!element.classList.contains("areyousure")) {
|
||||
if (element.dataset.nonce != nonce) {
|
||||
console.error("Nonce check failed!")
|
||||
return
|
||||
}
|
||||
document.querySelectorAll(".areyousure").forEach(i => {
|
||||
if (element.dataset.bsTarget == "#awardModal" && i.classList.contains('awardbtn'))
|
||||
return
|
||||
|
|
|
@ -251,6 +251,10 @@ function timestamp(t, ti) {
|
|||
};
|
||||
|
||||
function areyousure(t) {
|
||||
if (t.dataset.nonce != nonce) {
|
||||
console.error("Nonce check failed!")
|
||||
return
|
||||
}
|
||||
if (t.value) {
|
||||
t.dataset.oldvalue = t.value
|
||||
t.value = 'Are you sure?'
|
||||
|
|
Loading…
Reference in New Issue