Hacky attempt to force browsers to invalidate caches of JS files

This commit is contained in:
Ian Renton
2025-11-30 17:55:35 +00:00
parent 210a0564aa
commit b3be6b5ca4
8 changed files with 20 additions and 17 deletions

View File

@@ -24,7 +24,6 @@ function loadURLParams() {
// Handle other params
updateCheckboxFromParam(params, "dark-mode", "darkMode");
enableDarkMode($("#darkMode")[0].checked);
updateSelectFromParam(params, "time-zone", "timeZone"); // Only on Spots and Alerts pages
updateSelectFromParam(params, "limit", "spots-to-fetch"); // Only on Spots page
updateSelectFromParam(params, "limit", "alerts-to-fetch"); // Only on Alerts page
@@ -42,6 +41,10 @@ function updateCheckboxFromParam(params, paramName, checkboxID) {
let v = params.get(paramName);
if (v != null) {
$("#" + checkboxID).prop("checked", (v === "true") ? true : false);
// Extra check if this is the "dark mode" toggle
if (checkboxID == "darkMode") {
enableDarkMode((v === "true") ? true : false);
}
}
}