PageSourceSearch

https://its-my.link/assets/js/detect-dark-mode.js

js its-my.link collected 2026-09-24 09:52:48 UTC 319 bytes, 8 lines download raw bytes

1// Retrieve the value of the 'color-mode' key from local storage
2var colorMode = localStorage.getItem('color-mode');
3
4// Check if the value is valid and set it to 'auto' if not
5if (!colorMode || (colorMode !== 'light' && colorMode !== 'dark')) {
6  colorMode = 'auto';
7  localStorage.setItem('color-mode', colorMode);
8}

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.