add full screen display
This commit is contained in:
parent
5eaa8cc290
commit
e150954bb6
@ -211,6 +211,9 @@ try {
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h1 class="m-0"><i class="bi bi-hospital"></i> Hospital Queue Status / حالة انتظار المستشفى</h1>
|
<h1 class="m-0"><i class="bi bi-hospital"></i> Hospital Queue Status / حالة انتظار المستشفى</h1>
|
||||||
<div class="clock-container">
|
<div class="clock-container">
|
||||||
|
<button id="fullscreenToggle" class="btn btn-outline-light btn-sm" onclick="toggleFullScreen()">
|
||||||
|
<i class="bi bi-arrows-fullscreen"></i> Full Screen
|
||||||
|
</button>
|
||||||
<button id="soundToggle" class="btn btn-outline-light btn-sm" onclick="toggleSound(event)">
|
<button id="soundToggle" class="btn btn-outline-light btn-sm" onclick="toggleSound(event)">
|
||||||
<i class="bi bi-volume-up-fill" id="soundIcon"></i> Sound: ON
|
<i class="bi bi-volume-up-fill" id="soundIcon"></i> Sound: ON
|
||||||
</button>
|
</button>
|
||||||
@ -254,6 +257,18 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleFullScreen() {
|
||||||
|
if (!document.fullscreenElement) {
|
||||||
|
document.documentElement.requestFullscreen().catch(err => {
|
||||||
|
console.log(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (document.exitFullscreen) {
|
||||||
|
document.exitFullscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleSound(e) {
|
function toggleSound(e) {
|
||||||
if (e) e.stopPropagation(); // Prevent body onclick
|
if (e) e.stopPropagation(); // Prevent body onclick
|
||||||
audioEnabled = !audioEnabled;
|
audioEnabled = !audioEnabled;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user