PageSourceSearch

https://lightning.svbtle.com/packs/js/component-colormode-d3887e3177882804d867.chunk.js

js svbtle.com collected 2026-09-24 08:52:54 UTC 2,311 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkSvbtle=self.webpackChunkSvbtle||[]).push([[719],{640:function(t,e,o){var s=o(120);let i=null;e.default=class{constructor(){return i||(i=this),this.colormode_el=document.getElementById("colormode"),i}install(){this.start()}refresh(){this.start()}start(){this.getMode(),(0,s.sG)(document.getElementById("light-switch"),"click",t=>(this.handleColorSwitch(),t.stopPropagation(),!1)),this.setColormodeByCookie()}handleColorSwitch(){document.querySelector("body").classList.toggle("dark"),this.setColorCookie()}setColormodeByCookie(){let t=this.readColorCookie();void 0===t&&this.handleColorSwitch(),document.querySelector("body").classList.add(t)}getMode(){let t=document.querySelector("body").classList.contains("dark");this.current_mode=1==t?"dark":"light"}setColorCookie(){document.querySelector("body").classList.contains("dark");this.getMode();let t=new Date;t.setTime(t.getTime()+2592e6);let e="expires="+t.toUTCString();document.cookie="colormode="+this.current_mode+";"+e+"; domain=svbtle.com"}deleteColorCookie(){}readColorCookie(){let t="colormode=",e=decodeURIComponent(document.cookie).split(";");for(var o=0;o<e.length;o++){for(var s=e[o];" "==s.charAt(0);)s=s.substring(1);if(0==s.indexOf(t)){return s.substring(10,s.length)}}}}},120:function(t,e,o){o.d(e,{cb:function(){return n},sG:function(){return l},XG:function(){return r}});var s=class{constructor(t,e,...o){this.ms=t,this.callback=e,this.args=o,this.inst=null,this.start()}start(){return this.inst=window.setTimeout(this.callback,this.ms,this.args),this.inst}cancel(){window.clearTimeout(this.inst)}};var i=class{constructor(t,e){this.element=t||{},this.additionalOffset=e||0,this.start()}start(){const t=this.element.getBoundingClientRect(),e=document.body,o=document.documentElement,s=Math.max(e.scrollHeight,e.offsetHeight,o.clientHeight,o.scrollHeight,o.offsetHeight),i=t.top,n=s-document.documentElement.clientHeight,r=Math.min(i+window.pageYOffset-this.additionalOffset,n);return this.objOffset={left:t.left,top:r},this.left=this.objOffset.left,this.top=this.objOffset.top,this.objOffset}};function n(t,e,...o){return new s(t,e,...o)}function r(t,e){return new i(t,e)}function l(t,e,o){(t=t||document).addEventListener(e,o,!1)}}}]);
2//# sourceMappingURL=component-colormode-d3887e3177882804d867.chunk.js.map

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.