mirror of
https://github.com/pretix/pretix.git
synced 2026-09-13 16:14:40 +00:00
ESlint: Ignore vendored and pre-vue code (#6541)
* ESlint: Ignore vendored and pre-vue code * Format pre-vue code with eslint where possible --------- Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>
This commit is contained in:
co-authored by
Kara Engelhardt
parent
d9b5fa5b16
commit
d85e52c83e
@@ -1,21 +1,21 @@
|
||||
var hiddenfield = document.querySelector("input[name=origin][type=hidden]");
|
||||
let hiddenfield = document.querySelector('input[name=origin][type=hidden]')
|
||||
if (hiddenfield) {
|
||||
hiddenfield.value = window.location.origin
|
||||
hiddenfield.value = window.location.origin
|
||||
}
|
||||
async function runCheck() {
|
||||
if (document.getElementById("good_origin")) {
|
||||
if (document.getElementById("good_origin").innerText.split('').reverse().join('') !== window.location.origin) {
|
||||
const response = await fetch(document.getElementById("bad_origin_report_url").innerText.split('').reverse().join(''), {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
referrerPolicy: "unsafe-url",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
body: "origin=" + window.location.origin,
|
||||
});
|
||||
}
|
||||
}
|
||||
async function runCheck () {
|
||||
if (document.getElementById('good_origin')) {
|
||||
if (document.getElementById('good_origin').innerText.split('').reverse().join('') !== window.location.origin) {
|
||||
const _response = await fetch(document.getElementById('bad_origin_report_url').innerText.split('').reverse().join(''), {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
referrerPolicy: 'unsafe-url',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: 'origin=' + window.location.origin,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
runCheck();
|
||||
runCheck()
|
||||
|
||||
Reference in New Issue
Block a user