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.classList.contains("areyousure")) {
|
||||||
|
if (element.dataset.nonce != nonce) {
|
||||||
|
console.error("Nonce check failed!")
|
||||||
|
return
|
||||||
|
}
|
||||||
document.querySelectorAll(".areyousure").forEach(i => {
|
document.querySelectorAll(".areyousure").forEach(i => {
|
||||||
if (element.dataset.bsTarget == "#awardModal" && i.classList.contains('awardbtn'))
|
if (element.dataset.bsTarget == "#awardModal" && i.classList.contains('awardbtn'))
|
||||||
return
|
return
|
||||||
|
|
|
@ -251,6 +251,10 @@ function timestamp(t, ti) {
|
||||||
};
|
};
|
||||||
|
|
||||||
function areyousure(t) {
|
function areyousure(t) {
|
||||||
|
if (t.dataset.nonce != nonce) {
|
||||||
|
console.error("Nonce check failed!")
|
||||||
|
return
|
||||||
|
}
|
||||||
if (t.value) {
|
if (t.value) {
|
||||||
t.dataset.oldvalue = t.value
|
t.dataset.oldvalue = t.value
|
||||||
t.value = 'Are you sure?'
|
t.value = 'Are you sure?'
|
||||||
|
|
Loading…
Reference in New Issue