diff --git a/index.html b/index.html index f1130a9..cf729dc 100644 --- a/index.html +++ b/index.html @@ -2155,7 +2155,7 @@ body.spa-nav-hidden .spa-nav { display:none; } IcĂ´ne Gastinel Weather Studio
@@ -3426,8 +3426,8 @@ var Modules={ }, gws:function(root){ - var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0'; - var DEFAULT_VERSION = '0.5.0'; + var API_URL = '/gws/api/v1/update/windows/x86_64/0.0.0'; + var DEFAULT_VERSION = '0.6.0'; function copyText(text, cb) { if (navigator.clipboard && window.isSecureContext) { @@ -3959,8 +3959,17 @@ function boot(){ Promise.all(waits).then(hideLoader,hideLoader); } } -if(document.readyState!=='loading') boot(); -else document.addEventListener('DOMContentLoaded',boot); +// Badge de la carte GWS (Mes applications) : version stable lue en direct. +function majVersionGws(){ + var el=document.getElementById('gwsCarteVersion'); + if(!el||!window.fetch) return; + fetch('/gws/api/v1/update/windows/x86_64/0.0.0',{cache:'no-cache'}) + .then(function(r){ return r.ok&&r.status!==204?r.json():null; }) + .then(function(d){ if(d&&/^v?\d+\.\d+\.\d+$/.test(d.version||'')) el.textContent='Version '+d.version.replace(/^v/i,'')+' disponible'; }) + .catch(function(){}); +} +if(document.readyState!=='loading'){ boot(); majVersionGws(); } +else { document.addEventListener('DOMContentLoaded',boot); document.addEventListener('DOMContentLoaded',majVersionGws); } })();