aboutsummaryrefslogtreecommitdiff
path: root/srs-anywhere.js
diff options
context:
space:
mode:
authorJakob L. Kreuze2026-10-16 12:52:40 -0400
committerJakob L. Kreuze2026-10-16 12:52:40 -0400
commit319cc47ae6abafd2458cf9a014b791f14419d7ea (patch)
tree8518a9d31e34fc0819bd6b083e1d73887eb5e4e5 /srs-anywhere.js
parent00b5b3541c3b960b7a2f5ff69b5cc7e9a4582496 (diff)
Implement runtime-configurable features
In particular these things can now be enabled or disabled depending on the user's requirements: - A netbanner (previously implemented, later removed, hard-coded into fork) - Interactions with a scheduler server (previously implemented in branch cgi-storage)
Diffstat (limited to 'srs-anywhere.js')
-rw-r--r--srs-anywhere.js25
1 files changed, 24 insertions, 1 deletions
diff --git a/srs-anywhere.js b/srs-anywhere.js
index 8f77f02..1348a37 100644
--- a/srs-anywhere.js
+++ b/srs-anywhere.js
@@ -1,4 +1,4 @@
-/* Copyright © 2025 Jakob L. Kreuze
+/* Copyright © 2025 - 2026 Jakob L. Kreuze
This file is part of SRS Anywhere.
@@ -482,3 +482,26 @@ window.addEventListener('keydown', (event) => {
endReview();
}
});
+
+/***********************************************************************
+ * Runtime configuration *
+ ***********************************************************************/
+
+function enableClassificationBanner() {
+ console.log('here');
+ const banners = document.querySelectorAll('div.banner');
+ banners.forEach(banner => {
+ banner.removeAttribute('hidden');
+ });
+
+ const buttonContainer = document.getElementById('button-container');
+ if (buttonContainer) {
+ buttonContainer.style.bottom = '1rem';
+ }
+}
+
+window.addEventListener('load', () => {
+ if (SRS_ANYWHERE_CONFIG.banner) {
+ enableClassificationBanner();
+ }
+});

© 2015 - 2026 Jakob L. Kreuze