wvg/popup_updateNotice.js
2024-06-21 18:50:42 +09:00

11 lines
567 B
JavaScript

document.addEventListener('DOMContentLoaded', async function() {
cManifest=await fetch("manifest.json").then(r=>r.json());
rManifest=await fetch("https://raw.githubusercontent.com/FoxRefire/wvg/next/manifest.json").then(r=>r.json());
if(cManifest.version < rManifest.version){
let notice = document.getElementById("updateNotice");
notice.style.display='block';
notice.innerHTML = notice.innerHTML.replace("=VER=", rManifest.version);
notice.innerHTML = notice.innerHTML.replace("=HASH=", rManifest.version_name);
}
});