mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-09 09:42:26 +00:00
fix updates only being checked after 10m of launch
This commit is contained in:
parent
bd3c37dc3e
commit
04c93fa39b
1 changed files with 5 additions and 2 deletions
|
|
@ -645,7 +645,7 @@ hookCoverChange(false);
|
||||||
|
|
||||||
// Check latest release every 10m
|
// Check latest release every 10m
|
||||||
waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
||||||
setInterval(() => {
|
function checkForUpdate() {
|
||||||
fetch("https://api.github.com/repos/JulienMaille/dribbblish-dynamic-theme/releases/latest")
|
fetch("https://api.github.com/repos/JulienMaille/dribbblish-dynamic-theme/releases/latest")
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
|
@ -668,7 +668,10 @@ waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
||||||
// Do something for an error here
|
// Do something for an error here
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
}, 10 * 60 * 1000);
|
}
|
||||||
|
|
||||||
|
setInterval(checkForUpdate(), 10 * 60 * 1000);
|
||||||
|
checkForUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("html").css("--warning_message", " ");
|
$("html").css("--warning_message", " ");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue