Use version hash for asset cache busting
CI / build (push) Failing after 4m53s

This commit is contained in:
2026-08-09 10:37:25 -04:00
parent f753b27542
commit f2c0f755f6
6 changed files with 19 additions and 17 deletions
+9 -5
View File
@@ -1,4 +1,7 @@
document.addEventListener("DOMContentLoaded", function () {
(function () {
'use strict';
document.addEventListener("DOMContentLoaded", function () {
// Check URL parameters for custom views
const urlParams = new URLSearchParams(window.location.search);
const searchTagsRaw = urlParams.get("searchtags") || urlParams.get("searchTags") || "";
@@ -740,17 +743,17 @@ function getModalCurrentEntity(modal) {
}
function resolveThemeAssetBasePath() {
const cssLink = Array.from(document.querySelectorAll('link[rel="stylesheet"]')).find((link) => link.href && link.href.includes("/custom_views.css"));
const cssLink = Array.from(document.querySelectorAll('link[rel="stylesheet"]')).find((link) => link.href && (link.href.includes("/custom_views.css") || link.href.includes("/custom_views.min.css")));
if (cssLink && cssLink.href) {
const cssUrl = new URL(cssLink.href, window.location.origin);
const cssPath = cssUrl.pathname.replace(/\/css\/custom_views\.css$/, "");
const cssPath = cssUrl.pathname.replace(/\/(css|dist)\/custom_views(\.min)?\.css$/, "");
if (cssPath) return cssPath;
}
const jsScript = Array.from(document.querySelectorAll("script[src]")).find((script) => script.src && script.src.includes("/custom_views.js"));
const jsScript = Array.from(document.querySelectorAll("script[src]")).find((script) => script.src && (script.src.includes("/custom_views.js") || script.src.includes("/custom_views.min.js")));
if (jsScript && jsScript.src) {
const jsUrl = new URL(jsScript.src, window.location.origin);
const jsPath = jsUrl.pathname.replace(/\/js\/custom_views\.js$/, "");
const jsPath = jsUrl.pathname.replace(/\/(js|dist)\/custom_views(\.min)?\.js$/, "");
if (jsPath) return jsPath;
}
@@ -6080,3 +6083,4 @@ function setModalCustomNoteColor(color) {
console.error("Error saving custom color:", err);
});
}
})();