PageSourceSearch

https://thedigitalwise.com/app/themes/thedigitalwise/assets/js/theme-toggle.js?ver=1780143479

js thedigitalwise.com collected 2026-10-02 03:01:07 UTC 1,071 bytes, 20 lines download raw bytes

1(function () {
2  var root = document.documentElement;
3  var btn = document.getElementById('theme-toggle');
4  if (btn) {
5    btn.addEventListener('click', function () {
6      var dark = root.getAttribute('data-theme') === 'dark';
7      if (dark) { root.removeAttribute('data-theme'); try { localStorage.setItem('tdw-theme', 'light'); } catch (e) {} }
8      else { root.setAttribute('data-theme', 'dark'); try { localStorage.setItem('tdw-theme', 'dark'); } catch (e) {} }
9    });
10  }
11  // Search overlay
12  var open = document.getElementById('search-open');
13  var overlay = document.getElementById('search-overlay');
14  if (open && overlay) {
15    var input = overlay.querySelector('input');
16    open.addEventListener('click', function () { overlay.classList.add('open'); if (input) setTimeout(function(){input.focus();}, 60); });
17    overlay.addEventListener('click', function (e) { if (e.target === overlay) overlay.classList.remove('open'); });
18    document.addEventListener('keydown', function (e) { if (e.key === 'Escape') overlay.classList.remove('open'); });
19  }
20})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.