dist files for v1.3.1 built
This commit is contained in:
2
dist/bookmarklet-payload.js
vendored
2
dist/bookmarklet-payload.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bookmarklet.txt
vendored
2
dist/bookmarklet.txt
vendored
File diff suppressed because one or more lines are too long
2
dist/install.html
vendored
2
dist/install.html
vendored
File diff suppressed because one or more lines are too long
24
dist/kantine-standalone.html
vendored
24
dist/kantine-standalone.html
vendored
@@ -2756,17 +2756,39 @@ body {
|
||||
}
|
||||
|
||||
// === Last Updated Display ===
|
||||
let lastUpdatedTimestamp = null;
|
||||
let lastUpdatedIntervalId = null;
|
||||
|
||||
function updateLastUpdatedTime(isoTimestamp) {
|
||||
const subtitle = document.getElementById('last-updated-subtitle');
|
||||
if (!isoTimestamp) return;
|
||||
lastUpdatedTimestamp = isoTimestamp;
|
||||
try {
|
||||
const date = new Date(isoTimestamp);
|
||||
const timeStr = date.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
|
||||
const dateStr = date.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' });
|
||||
subtitle.textContent = `Aktualisiert: ${dateStr} ${timeStr}`;
|
||||
const ago = getRelativeTime(date);
|
||||
subtitle.textContent = `Aktualisiert: ${dateStr} ${timeStr} (${ago})`;
|
||||
} catch (e) {
|
||||
subtitle.textContent = '';
|
||||
}
|
||||
// Auto-refresh relative time every minute
|
||||
if (!lastUpdatedIntervalId) {
|
||||
lastUpdatedIntervalId = setInterval(() => {
|
||||
if (lastUpdatedTimestamp) updateLastUpdatedTime(lastUpdatedTimestamp);
|
||||
}, 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
function getRelativeTime(date) {
|
||||
const diffMs = Date.now() - date.getTime();
|
||||
const diffMin = Math.floor(diffMs / 60000);
|
||||
if (diffMin < 1) return 'gerade eben';
|
||||
if (diffMin === 1) return 'vor 1 min.';
|
||||
if (diffMin < 60) return `vor ${diffMin} min.`;
|
||||
const diffH = Math.floor(diffMin / 60);
|
||||
if (diffH === 1) return 'vor 1 Std.';
|
||||
return `vor ${diffH} Std.`;
|
||||
}
|
||||
|
||||
// === Toast Notification ===
|
||||
|
||||
24
kantine.js
24
kantine.js
@@ -1020,17 +1020,39 @@
|
||||
}
|
||||
|
||||
// === Last Updated Display ===
|
||||
let lastUpdatedTimestamp = null;
|
||||
let lastUpdatedIntervalId = null;
|
||||
|
||||
function updateLastUpdatedTime(isoTimestamp) {
|
||||
const subtitle = document.getElementById('last-updated-subtitle');
|
||||
if (!isoTimestamp) return;
|
||||
lastUpdatedTimestamp = isoTimestamp;
|
||||
try {
|
||||
const date = new Date(isoTimestamp);
|
||||
const timeStr = date.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
|
||||
const dateStr = date.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit' });
|
||||
subtitle.textContent = `Aktualisiert: ${dateStr} ${timeStr}`;
|
||||
const ago = getRelativeTime(date);
|
||||
subtitle.textContent = `Aktualisiert: ${dateStr} ${timeStr} (${ago})`;
|
||||
} catch (e) {
|
||||
subtitle.textContent = '';
|
||||
}
|
||||
// Auto-refresh relative time every minute
|
||||
if (!lastUpdatedIntervalId) {
|
||||
lastUpdatedIntervalId = setInterval(() => {
|
||||
if (lastUpdatedTimestamp) updateLastUpdatedTime(lastUpdatedTimestamp);
|
||||
}, 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
function getRelativeTime(date) {
|
||||
const diffMs = Date.now() - date.getTime();
|
||||
const diffMin = Math.floor(diffMs / 60000);
|
||||
if (diffMin < 1) return 'gerade eben';
|
||||
if (diffMin === 1) return 'vor 1 min.';
|
||||
if (diffMin < 60) return `vor ${diffMin} min.`;
|
||||
const diffH = Math.floor(diffMin / 60);
|
||||
if (diffH === 1) return 'vor 1 Std.';
|
||||
return `vor ${diffH} Std.`;
|
||||
}
|
||||
|
||||
// === Toast Notification ===
|
||||
|
||||
Reference in New Issue
Block a user