PageSourceSearch

https://bot.rustplus.io/help/assets/js/dark-mode-switch.min.js

js rustplus.io collected 2026-10-08 05:47:32 UTC 1,078 bytes, 9 lines download raw bytes

1/*!
2 * Dark Mode Switch v1.0.1 (https://github.com/coliff/dark-mode-switch)
3 * Copyright 2021 C.Oliff
4 * Licensed under MIT (https://github.com/coliff/dark-mode-switch/blob/main/LICENSE)
5 */
6function systemPrefersDark() {
7  return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
8}
9var darkSwitch=document.getElementById("darkSwitch");window.addEventListener("load",(function(){if(darkSwitch){initTheme();darkSwitch.addEventListener("change",(function(){resetTheme()}))}}));function initTheme(){var darkThemeSelected=(localStorage.getItem("darkSwitch")!==null&&localStorage.getItem("darkSwitch")==="dark")||(localStorage.getItem("darkSwitch")===null&&systemPrefersDark());darkSwitch.checked=darkThemeSelected;darkThemeSelected?document.body.setAttribute("data-theme","dark"):document.body.removeAttribute("data-theme")}function resetTheme(){if(darkSwitch.checked){document.body.setAttribute("data-theme","dark");localStorage.setItem("darkSwitch","dark")}else{document.body.removeAttribute("data-theme");localStorage.setItem("darkSwitch","light")}}

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.