Update cache-busting parameters and enhance script loading in slideshow
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
<script src="scripts/jquery-1.9.1.min.js"></script>
|
||||
<script src="scripts/bootstrap.min.js"></script>
|
||||
<script src="scripts/jquery.bgswitcher.js"></script>
|
||||
<script type="text/javascript" src="scripts/index.js?nocache=2025-09-20-13-32"></script>
|
||||
<script type="text/javascript" src="scripts/index.js?nocache=2025-12-07-04-04"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -14,12 +14,12 @@
|
||||
var _hasLast = false;
|
||||
var _hasList = false;
|
||||
var _hasTime = false;
|
||||
var _TimeElement = null;
|
||||
var _TickLoadList = null;
|
||||
var _DeviceReadyDiv = typeof document == 'undefined' ? undefined : $('#deviceReady div');
|
||||
var _TimeElement = typeof document == 'undefined' ? undefined : document.createElement('time');
|
||||
var _DeviceReadyDiv = null;
|
||||
|
||||
function loadData(mm, dd) {
|
||||
const url = _UniformResourceLocator + '/slideshow/' + _DataDirectory + '/' + mm + '-' + dd + '.json?nocache=2025-09-20-13-32';
|
||||
const url = _UniformResourceLocator + '/slideshow/' + _DataDirectory + '/' + mm + '-' + dd + '.json?nocache=2025-12-07-04-04';
|
||||
console.log(url);
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
@ -178,7 +178,7 @@
|
||||
_hasTime = typeof window == 'undefined' ? false : window.location.href.indexOf('time') > 0;
|
||||
const fixedDateSegments = typeof window == 'undefined' ? [] : window.location.href.split('fixed-date=');
|
||||
const imageIntervalSegments = typeof window == 'undefined' ? [] : window.location.href.split('image-interval=');
|
||||
const url = uniformResourceLocator + '/slideshow/index.json?nocache=2025-09-20-13-32';
|
||||
const url = uniformResourceLocator + '/slideshow/index.json?nocache=2025-12-07-04-04';
|
||||
console.log(url);
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
@ -244,7 +244,7 @@
|
||||
}
|
||||
|
||||
function loadLog() {
|
||||
const url = _UniformResourceLocator + '/log-nginx/access.log?nocache=2025-09-20-13-32';
|
||||
const url = _UniformResourceLocator + '/log-nginx/access.log?nocache=2025-12-07-04-04';
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
.then((text) => {
|
||||
@ -272,9 +272,16 @@
|
||||
loadPage();
|
||||
} else {
|
||||
$(document).ready(function () {
|
||||
console.log('onDeviceReady');
|
||||
document.addEventListener('keyup', getInput, false);
|
||||
loadPage();
|
||||
console.log('document.Ready');
|
||||
_DeviceReadyDiv = typeof document == 'undefined' ? undefined : $('#deviceReady div');
|
||||
_TimeElement = typeof document == 'undefined' ? undefined : document.createElement('time');
|
||||
const fixedDate = typeof document == 'undefined' ? undefined : $('#fixed-date');
|
||||
if (fixedDate != undefined && fixedDate.length === 1) {
|
||||
fixedDate.val(new Date().toISOString().slice(5, 10));
|
||||
} else {
|
||||
document.addEventListener('keyup', getInput, false);
|
||||
loadPage();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user