PageSourceSearch

https://pikselkraft.fr/assets/js/index.js

js pikselkraft.fr collected 2026-10-04 13:26:41 UTC 924 bytes, 30 lines download raw bytes

1function getStorage(key) {
2  try { return localStorage.getItem(key); } catch (e) { return null; }
3}
4
5function setStorage(key, value) {
6  try { localStorage.setItem(key, value); } catch (e) {}
7}
8
9const _currentTheme = getStorage('theme');
10const colorScheme = document.querySelector('meta[name=color-scheme]');
11const switchButtons = document.querySelectorAll('button.color-mode');
12
13// Alternative to set cookie for form submit on maintenance
14if (window.location.href.includes('/maintenance/')) {
15  colorScheme.content = 'light';
16}
17
18switchButtons.forEach(button => {
19  button.addEventListener('click', () => {
20    switchButtons.forEach(btn => btn.setAttribute('aria-pressed', btn === button));
21    colorScheme.content = button.value;
22    setStorage('theme', button.value);
23  });
24});
25
26if (_currentTheme === 'dark' || _currentTheme === 'light') {
27  colorScheme.content = _currentTheme;
28}
29
30/*@TODO easter eggs bourgogne + geek */

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.