diff --git a/index.html b/index.html
index f698f1f..42de701 100644
--- a/index.html
+++ b/index.html
@@ -722,6 +722,19 @@
+
@@ -1103,7 +1116,7 @@
const elements = this.form.elements;
for (const element of elements) {
- if (!element.name) continue;
+ if (!element.name || element.dataset.notIni == "true") continue;
let value;
switch (element.type) {
@@ -1234,6 +1247,23 @@
} else {
history.replaceState({ page: 'main' }, '', window.location.pathname);
}
+
+ const fullscreenElement = document.getElementById('window-fullscreen');
+ const windowedElement = document.getElementById('window-windowed');
+
+ fullscreenElement.addEventListener('change', () => {
+ if (fullscreenElement.checked) {
+ document.documentElement.requestFullscreen().catch(err => {
+ console.error(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
+ });
+ }
+ });
+
+ windowedElement.addEventListener('change', () => {
+ if (windowedElement.checked && document.fullscreenElement) {
+ document.exitFullscreen();
+ }
+ });
});