fix: can't find variable on webkit

This commit is contained in:
franek 2024-03-08 08:27:24 +01:00 committed by GitHub
parent da610f3c81
commit de43978359
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,12 +1,12 @@
const startPage = document.getElementById('internal__start-page');
const templatePage = document.getElementById('internal__template');
const wait = (time) => new Promise(resolve => setTimeout(resolve, time * 1000));
if (!startPage || !templatePage) {
alert("Base website template got corrupted! Can't find either start page or template page. Closing the window.");
window.close();
} else {
const wait = (time) => new Promise(resolve => setTimeout(resolve, time * 1000))
async function proceed() {
const input = document.querySelector('#internal__start-page > input');
const patches = DATA?.[input.value];
@ -38,4 +38,4 @@ if (!startPage || !templatePage) {
}
internal__submit.addEventListener('click', async () => await proceed())
}
}