Add a picture of me

This commit is contained in:
kamkow1
2025-06-20 14:35:12 +02:00
parent 0fab7bcffe
commit 27581183fd
9 changed files with 31 additions and 34 deletions

View File

@ -18,38 +18,7 @@ async function fetch_build_id()
return json.build_id;
}
(async function() {
build_id = await fetch_build_id();
})();
const asyncIntervals = [];
const runAsyncInterval = async (cb, interval, intervalIndex) => {
await cb();
if (asyncIntervals[intervalIndex]) {
setTimeout(() => runAsyncInterval(cb, interval, intervalIndex), interval);
}
};
const setAsyncInterval = (cb, interval) => {
if (cb && typeof cb === "function") {
const intervalIndex = asyncIntervals.length;
asyncIntervals.push(true);
runAsyncInterval(cb, interval, intervalIndex);
return intervalIndex;
} else {
throw new Error('Callback must be a function');
}
};
const clearAsyncInterval = (intervalIndex) => {
if (asyncIntervals[intervalIndex]) {
asyncIntervals[intervalIndex] = false;
}
};
setAsyncInterval(async function () {
setInterval(async function() {
let new_build_id = await fetch_build_id();
if (build_id !== new_build_id) {
location.reload(true);