Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
samolukadjo authored Jan 18, 2024
1 parent 782477d commit 6956c70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
navigator.serviceWorker && navigator.serviceWorker.register('/sw.js?ver=14').then(function (registration) {
navigator.serviceWorker && navigator.serviceWorker.register('/sw.js?ver=15').then(function (registration) {
console.log('Excellent, registered with scope: ', registration.scope);
});

Expand All @@ -8,7 +8,7 @@ const buttonClear = document.getElementById("button-clear");
const buttonEqual = document.getElementById("button-equal");
let errSetting = 0;
let counter = 0;
const version = 14;
const version = 15;

buttons.forEach(item => {
let val = item.dataset.purpose;
Expand Down Expand Up @@ -74,7 +74,7 @@ function checkForUpdates() {
console.log("Checking for updates 1/2");
if ('serviceWorker' in navigator) {
console.log("Checking for updates 2/2");
navigator.serviceWorker.register('/sw.js?ver=13').then((registration) => {
navigator.serviceWorker.register('/sw.js?ver=' + version).then((registration) => {
const storedVersion = localStorage.getItem('sw-version');
if (storedVersion !== version) {
console.log("Installing updates.");
Expand Down

0 comments on commit 6956c70

Please sign in to comment.