Skip to content

Commit

Permalink
Improvements to cache managing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinoosauro authored Jul 26, 2023
1 parent 1cdf994 commit 544202e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ if ('serviceWorker' in navigator) {
};
registerServiceWorker();
}
let appVersion = "1.1.2";
fetch("https://dinoosauro.github.io/UpdateVersion/msedgeimg-updatecode", {cache: "no-store"}).then((res) => res.text().then((text) => {if (text.replace("\n", "") !== appVersion) if (confirm(`There's a new version of image-converter. Do you want to update? [${appVersion} --> ${text.replace("\n", "")}]`)) caches.keys().then((names) => {for (let item in names) {caches.delete(item); location.reload(true);}})}).catch((e) => {console.error(e)})).catch((e) => console.error(e));
let appVersion = "1.1.3";
fetch("https://dinoosauro.github.io/UpdateVersion/msedgeimg-updatecode", {cache: "no-store"}).then((res) => res.text().then((text) => {if (text.replace("\n", "") !== appVersion) if (confirm(`There's a new version of msedge-img-edit. Do you want to update? [${appVersion} --> ${text.replace("\n", "")}]`)) {caches.delete("msedgeimgedit-cache"); location.reload(true);}}).catch((e) => {console.error(e)})).catch((e) => console.error(e));
function openPicker() {
document.getElementById("fileOpen").click();
}
Expand Down

0 comments on commit 544202e

Please sign in to comment.