sitemap update
This commit is contained in:
12
refresh.js
12
refresh.js
@@ -8,9 +8,9 @@
|
||||
function reloadStylesheets() {
|
||||
// Force reload all stylesheets
|
||||
const links = document.querySelectorAll('link[rel="stylesheet"]');
|
||||
links.forEach(link => {
|
||||
const href = link.href.split('?')[0];
|
||||
link.href = href + '?t=' + new Date().getTime();
|
||||
links.forEach((link) => {
|
||||
const href = link.href.split("?")[0];
|
||||
link.href = href + "?t=" + new Date().getTime();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
const data = JSON.parse(event.data);
|
||||
if (data.type === "reload") {
|
||||
console.log("Repository updated, reloading page...");
|
||||
|
||||
|
||||
// First reload stylesheets
|
||||
reloadStylesheets();
|
||||
|
||||
|
||||
// Then hard reload the page after a brief delay
|
||||
setTimeout(() => {
|
||||
window.location.reload(true);
|
||||
@@ -69,4 +69,4 @@
|
||||
eventSource.close();
|
||||
}
|
||||
});
|
||||
})();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user