Form
This commit is contained in:
@ -2,6 +2,11 @@ body {
|
||||
background-color: #191717;
|
||||
}
|
||||
|
||||
#slideshow-form div {
|
||||
color: white;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
#deviceReady div {
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
@ -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-08-10-15-12"></script>
|
||||
<script type="text/javascript" src="scripts/index.js?nocache=2025-09-20-13-32"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -18,11 +18,8 @@
|
||||
var _DeviceReadyDiv = typeof document == 'undefined' ? undefined : $('#deviceReady div');
|
||||
var _TimeElement = typeof document == 'undefined' ? undefined : document.createElement('time');
|
||||
|
||||
function loadData() {
|
||||
const currentDate = new Date();
|
||||
const dd = currentDate.getDate().toString().padStart(2, '0');
|
||||
const mm = (new Date().getMonth() + 1).toString().padStart(2, '0');
|
||||
const url = _UniformResourceLocator + '/slideshow/' + _DataDirectory + '/' + mm + '-' + dd + '.json?nocache=2025-08-10-15-12';
|
||||
function loadData(mm, dd) {
|
||||
const url = _UniformResourceLocator + '/slideshow/' + _DataDirectory + '/' + mm + '-' + dd + '.json?nocache=2025-09-20-13-32';
|
||||
console.log(url);
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
@ -47,7 +44,9 @@
|
||||
if (currentHours === 0) {
|
||||
const currentMinutes = currentDate.getMinutes();
|
||||
if (currentMinutes === 0) {
|
||||
loadData();
|
||||
const dd = currentDate.getDate().toString().padStart(2, '0');
|
||||
const mm = (new Date().getMonth() + 1).toString().padStart(2, '0');
|
||||
loadData(mm, dd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -177,7 +176,9 @@
|
||||
_hasLast = typeof window == 'undefined' ? false : window.location.href.indexOf('last') > 0;
|
||||
_hasList = typeof window == 'undefined' ? false : window.location.href.indexOf('list') > 0;
|
||||
_hasTime = typeof window == 'undefined' ? false : window.location.href.indexOf('time') > 0;
|
||||
const url = uniformResourceLocator + '/slideshow/index.json?nocache=2025-08-10-15-12';
|
||||
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';
|
||||
console.log(url);
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
@ -197,10 +198,28 @@
|
||||
if (_hasLast) {
|
||||
loadLog();
|
||||
}
|
||||
loadData();
|
||||
if (fixedDateSegments.length === 2) {
|
||||
const fixedDateSegmentsB = fixedDateSegments[1].split('&')[0];
|
||||
console.log('fixed-date=' + fixedDateSegmentsB);
|
||||
const fixedDateSegmentsC = fixedDateSegmentsB.split('-');
|
||||
loadData(fixedDateSegmentsC[0], fixedDateSegmentsC[1]);
|
||||
}
|
||||
else {
|
||||
const currentDate = new Date();
|
||||
const dd = currentDate.getDate().toString().padStart(2, '0');
|
||||
const mm = (new Date().getMonth() + 1).toString().padStart(2, '0');
|
||||
loadData(mm, dd);
|
||||
}
|
||||
if (!_hasList && _DeviceReadyDiv != undefined) {
|
||||
setInterval(onTickJSON, data.JsonInterval);
|
||||
setInterval(onTickImage, data.ImageInterval);
|
||||
if (imageIntervalSegments.length === 1) {
|
||||
setInterval(onTickImage, data.ImageInterval);
|
||||
}
|
||||
else {
|
||||
const imageInterval = imageIntervalSegments[1].split('&')[0] + 123;
|
||||
console.log('image-interval=' + imageInterval);
|
||||
setInterval(onTickImage, imageInterval);
|
||||
}
|
||||
}
|
||||
if (_hasList && _hasLast) {
|
||||
_TickLoadList = setInterval(onTickLoadList, 500);
|
||||
@ -225,7 +244,7 @@
|
||||
}
|
||||
|
||||
function loadLog() {
|
||||
const url = _UniformResourceLocator + '/log-nginx/access.log?nocache=2025-08-10-15-12';
|
||||
const url = _UniformResourceLocator + '/log-nginx/access.log?nocache=2025-09-20-13-32';
|
||||
fetch(url, { nocache: new Date().getTime() })
|
||||
.then((res) => res.text())
|
||||
.then((text) => {
|
||||
|
Reference in New Issue
Block a user