MCPcopy Create free account
hub / github.com/apache/storm / updateThemeButtonLabel

Function updateThemeButtonLabel

storm-webapp/src/main/webapp/js/script.js:52–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50// The button is rendered asynchronously by Mustache templates loaded via AJAX,
51// so we use a MutationObserver to catch it.
52function updateThemeButtonLabel() {
53 var current = document.documentElement.getAttribute('data-bs-theme') || 'light';
54 var btn = document.getElementById('theme-toggle-btn');
55 if (btn) {
56 btn.value = (current === 'dark') ? 'Light Mode' : 'Dark Mode';
57 }
58}
59
60(function() {
61 var observer = new MutationObserver(function() { updateThemeButtonLabel(); });

Callers 1

script.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected