Implement kiosk mode functionality and update external link handling in footer and credits
This commit is contained in:
13
static/js/kiosk_mode.js
Normal file
13
static/js/kiosk_mode.js
Normal file
@ -0,0 +1,13 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setTimeout(() => {
|
||||
// TODO: How to start kiosk mode?
|
||||
if (true) {
|
||||
console.info('Kiosk mode -> Disabled all external links');
|
||||
document.querySelectorAll('a').forEach((link) => {
|
||||
if (link.classList.contains('external-link')) {
|
||||
link.style.pointerEvents = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
});
|
@ -79,7 +79,7 @@ function handleImage() {
|
||||
}, 1000);
|
||||
|
||||
// Set the credits
|
||||
credits.innerHTML = `Photo by <a href="${data.user.links.html}" target="_blank">${data.user.name}</a>`;
|
||||
credits.innerHTML = `Photo by <a href="${data.user.links.html}" class="external-link" target="_blank">${data.user.name}</a>`;
|
||||
credits.style.zIndex = 300000;
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user