mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-25 13:02:10 +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
|
||||
waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
||||
setInterval(() => {
|
||||
function checkForUpdate() {
|
||||
fetch("https://api.github.com/repos/JulienMaille/dribbblish-dynamic-theme/releases/latest")
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
|
|
@ -668,7 +668,10 @@ waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
|||
// Do something for an error here
|
||||
console.error(err);
|
||||
});
|
||||
}, 10 * 60 * 1000);
|
||||
}
|
||||
|
||||
setInterval(checkForUpdate(), 10 * 60 * 1000);
|
||||
checkForUpdate();
|
||||
});
|
||||
|
||||
$("html").css("--warning_message", " ");
|
||||
|
|
|
|||
Loading…
Reference in a new issue