Merge branch 'master' of http://192.168.2.166:3000/hyojin.ahn/goiintra
This commit is contained in:
commit
ac902c3db4
|
|
@ -87,9 +87,9 @@
|
|||
?>
|
||||
|
||||
|
||||
<link href="assets/css/mapMAPCSS.css" rel="stylesheet" type="text/css" >
|
||||
<link href="/assets/css/mapMAPCSS.css" rel="stylesheet" type="text/css" >
|
||||
<!-- New2 -->
|
||||
<link href="assets/css/leftside-modal.css" rel="stylesheet">
|
||||
<link href="/assets/css/leftside-modal.css" rel="stylesheet">
|
||||
<!-- New2 -->
|
||||
|
||||
<!--script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script-->
|
||||
|
|
@ -2510,31 +2510,40 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
|
||||
async function forceRefresh() {
|
||||
const cssFiles = [
|
||||
'assets/css/mapMAPCSS.css',
|
||||
'assets/css/main.css',
|
||||
'assets/css/leftside-modal.css'
|
||||
];
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(keys.map(key => caches.delete(key)));
|
||||
}
|
||||
window.location.reload();
|
||||
/*
|
||||
const cssFiles = [
|
||||
'mapMAPCSS.css',
|
||||
'main.css',
|
||||
'leftside-modal.css'
|
||||
];
|
||||
|
||||
// CSS 강제 새로고침
|
||||
cssFiles.forEach(file => {
|
||||
const link = document.querySelector(`link[href^="${file}"]`);
|
||||
if (link) {
|
||||
const href = link.href.split('?')[0];
|
||||
link.href = href + '?view=map&_=' + new Date().getTime();
|
||||
}
|
||||
});
|
||||
cssFiles.forEach(file => {
|
||||
const oldLink = Array.from(document.querySelectorAll('link[rel="stylesheet"]'))
|
||||
.find(l => l.href.endsWith(file));
|
||||
if (oldLink) {
|
||||
const newLink = oldLink.cloneNode();
|
||||
newLink.href = oldLink.href.split('?')[0] + '?view=map&_=' + new Date().getTime();
|
||||
oldLink.parentNode.replaceChild(newLink, oldLink);
|
||||
console.log(`CSS replaced: ${newLink.href}`);
|
||||
} else {
|
||||
console.warn(`CSS not found: ${file}`);
|
||||
}
|
||||
});
|
||||
|
||||
// 브라우저 캐시 삭제
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(keys.map(key => caches.delete(key)));
|
||||
}
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
console.log('Cache keys found:', keys);
|
||||
await Promise.all(keys.map(key => caches.delete(key)));
|
||||
console.log('Caches cleared');
|
||||
}
|
||||
|
||||
// 페이지 새로고침
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('view', 'map'); // view=map 유지
|
||||
window.location.href = url.toString();
|
||||
console.log('CSS force refresh completed without page reload');
|
||||
*/
|
||||
}
|
||||
|
||||
$('.point-overlay').on(
|
||||
|
|
|
|||
Loading…
Reference in New Issue