mirror of
https://github.com/smittix/intercept.git
synced 2026-07-12 03:28:11 -07:00
Stop clearing browser caches on load
This commit is contained in:
@@ -21,20 +21,6 @@
|
|||||||
window.INTERCEPT_ADSB_AUTO_START = {{ adsb_auto_start | tojson }};
|
window.INTERCEPT_ADSB_AUTO_START = {{ adsb_auto_start | tojson }};
|
||||||
window.INTERCEPT_DEFAULT_LAT = {{ default_latitude | tojson }};
|
window.INTERCEPT_DEFAULT_LAT = {{ default_latitude | tojson }};
|
||||||
window.INTERCEPT_DEFAULT_LON = {{ default_longitude | tojson }};
|
window.INTERCEPT_DEFAULT_LON = {{ default_longitude | tojson }};
|
||||||
if ('serviceWorker' in navigator) {
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
navigator.serviceWorker.getRegistrations()
|
|
||||||
.then((registrations) => Promise.all(registrations.map((registration) => registration.unregister())))
|
|
||||||
.catch(() => {});
|
|
||||||
if ('caches' in window) {
|
|
||||||
caches.keys()
|
|
||||||
.then((keys) => Promise.all(
|
|
||||||
keys.filter((key) => key.startsWith('intercept-')).map((key) => caches.delete(key))
|
|
||||||
))
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<script defer src="{{ url_for('static', filename='vendor/leaflet/leaflet.js') }}"></script>
|
<script defer src="{{ url_for('static', filename='vendor/leaflet/leaflet.js') }}"></script>
|
||||||
<script defer src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
|
<script defer src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
|
||||||
|
|||||||
@@ -16407,22 +16407,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Disable legacy static-asset service worker to avoid stale dashboard JS/CSS -->
|
|
||||||
<script>
|
<script>
|
||||||
if ('serviceWorker' in navigator) {
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
navigator.serviceWorker.getRegistrations()
|
|
||||||
.then((registrations) => Promise.all(registrations.map((registration) => registration.unregister())))
|
|
||||||
.catch(() => {});
|
|
||||||
if ('caches' in window) {
|
|
||||||
caches.keys()
|
|
||||||
.then((keys) => Promise.all(
|
|
||||||
keys.filter((key) => key.startsWith('intercept-')).map((key) => caches.delete(key))
|
|
||||||
))
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Initialize global core modules after page load
|
// Initialize global core modules after page load
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
if (typeof VoiceAlerts !== 'undefined') VoiceAlerts.init();
|
if (typeof VoiceAlerts !== 'undefined') VoiceAlerts.init();
|
||||||
|
|||||||
@@ -18,20 +18,6 @@
|
|||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/satellite_dashboard.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/satellite_dashboard.css') }}">
|
||||||
<script>
|
<script>
|
||||||
window.INTERCEPT_SHARED_OBSERVER_LOCATION = {{ shared_observer_location | tojson }};
|
window.INTERCEPT_SHARED_OBSERVER_LOCATION = {{ shared_observer_location | tojson }};
|
||||||
if ('serviceWorker' in navigator) {
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
navigator.serviceWorker.getRegistrations()
|
|
||||||
.then((registrations) => Promise.all(registrations.map((registration) => registration.unregister())))
|
|
||||||
.catch(() => {});
|
|
||||||
if ('caches' in window) {
|
|
||||||
caches.keys()
|
|
||||||
.then((keys) => Promise.all(
|
|
||||||
keys.filter((key) => key.startsWith('intercept-')).map((key) => caches.delete(key))
|
|
||||||
))
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user