mirror of
https://github.com/pischule/memevizor.git
synced 2025-12-19 06:56:42 +00:00
Make q button toggle qr visibility
This commit is contained in:
@@ -143,6 +143,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function toggleQrVisibility() {
|
||||
const qr = document.getElementById("qr-code");
|
||||
const isVisible = qr.style.display === '';
|
||||
qr.style.display = isVisible ? 'none' : '';
|
||||
}
|
||||
|
||||
// --- Event Listeners ---
|
||||
document.addEventListener('DOMContentLoaded', refreshMedia); // Initial fetch
|
||||
setInterval(refreshMedia, refreshIntervalMs); // Periodic refresh
|
||||
@@ -153,6 +159,10 @@
|
||||
event.preventDefault(); // Prevent page scroll
|
||||
refreshMedia();
|
||||
}
|
||||
|
||||
if (event.key === 'q') {
|
||||
toggleQrVisibility()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user