diff options
| author | Jieiku | 2023-08-25 01:44:50 -0700 |
|---|---|---|
| committer | Jieiku | 2023-08-25 01:44:50 -0700 |
| commit | 009d3f90b1881530bd28003abe83cfc3735882be (patch) | |
| tree | 5112554449edf2aaff956b9c364133ec41ff39c5 /static/js | |
| parent | c04ff0a3ac2aff149c3454f7563de3f7941e373d (diff) | |
| download | abridge-009d3f90b1881530bd28003abe83cfc3735882be.tar.gz abridge-009d3f90b1881530bd28003abe83cfc3735882be.tar.bz2 abridge-009d3f90b1881530bd28003abe83cfc3735882be.zip | |
Refactor Documentation, PWA Fix, image shortcodes fix, simplify js script loading
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/abridge_nosearch.min.js (renamed from static/js/abridge-nosearch.min.js) | 0 | ||||
| -rw-r--r-- | static/js/sw_load.js | 6 | ||||
| -rw-r--r-- | static/js/sw_load.min.js | 2 | ||||
| -rw-r--r-- | static/js/theme_button.js | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/static/js/abridge-nosearch.min.js b/static/js/abridge_nosearch.min.js index 7ae9810..7ae9810 100644 --- a/static/js/abridge-nosearch.min.js +++ b/static/js/abridge_nosearch.min.js diff --git a/static/js/sw_load.js b/static/js/sw_load.js index 9c10723..8c72944 100644 --- a/static/js/sw_load.js +++ b/static/js/sw_load.js @@ -1,13 +1,13 @@ if ("serviceWorker" in navigator) { navigator.serviceWorker - .register("/sw.min.js?v=3.7.8", { scope: "/" }) + .register("/sw.min.js?v=3.8.0", { scope: "/" }) .then(() => { - console.info("SW Loaded"); + //console.info("SW Loaded"); }, err => console.error("SW error: ", err)); navigator.serviceWorker .ready .then(() => { - console.info("SW Ready"); + //console.info("SW Ready"); }); } diff --git a/static/js/sw_load.min.js b/static/js/sw_load.min.js index 2bc0802..e991797 100644 --- a/static/js/sw_load.min.js +++ b/static/js/sw_load.min.js @@ -1 +1 @@ -"serviceWorker"in navigator&&(navigator.serviceWorker.register("/sw.min.js?v=3.7.8",{scope:"/"}).then(()=>{console.info("SW Loaded")},e=>console.error("SW error: ",e)),navigator.serviceWorker.ready.then(()=>{console.info("SW Ready")}));
\ No newline at end of file +"serviceWorker"in navigator&&(navigator.serviceWorker.register("/sw.min.js?v=3.8.0",{scope:"/"}).then(()=>{},r=>console.error("SW error: ",r)),navigator.serviceWorker.ready.then(()=>{}));
\ No newline at end of file diff --git a/static/js/theme_button.js b/static/js/theme_button.js index b03f17f..b60f85e 100644 --- a/static/js/theme_button.js +++ b/static/js/theme_button.js @@ -1,6 +1,6 @@ -// Set lightmode +// switch theme mode if (document.getElementById('mode')) { - document.getElementById('mode').addEventListener('click', () => { + document.getElementById('mode').addEventListener('click', () => { document.documentElement.classList.toggle('switch'); localStorage.setItem('theme', document.documentElement.classList.contains('switch') ? 'switch' : 'default'); }); |
