PageSourceSearch

https://jaliscoscarbonfiber.com/cdn/shop/t/156/assets/gradient-system.js?v=9481125546569420891788489952

js jaliscoscarbonfiber.com collected 2026-10-04 04:57:52 UTC 5,984 bytes, 2 lines download raw bytes

1(function(){"use strict";const GradientSystem={sections:{body:!0,header:!0,footer:!0,buttons:!0,drawers:!0,cards:!0},isEnabled:function(){return getComputedStyle(document.documentElement).getPropertyValue("--use-gradients").trim()==="1"},getSectionSettings:function(){const rootStyle=getComputedStyle(document.documentElement);return{body:rootStyle.getPropertyValue("--gradients-body").trim()==="1",header:rootStyle.getPropertyValue("--gradients-header").trim()==="1",footer:rootStyle.getPropertyValue("--gradients-footer").trim()==="1",buttons:rootStyle.getPropertyValue("--gradients-buttons").trim()==="1",drawers:rootStyle.getPropertyValue("--gradients-drawers").trim()==="1",cards:rootStyle.getPropertyValue("--gradients-cards").trim()==="1"}},getBorderSettings:function(){const rootStyle=getComputedStyle(document.documentElement);return{sections:rootStyle.getPropertyValue("--gradient-borders-sections").trim()==="1",footer:rootStyle.getPropertyValue("--gradient-borders-footer").trim()==="1",collections:rootStyle.getPropertyValue("--gradient-borders-collections").trim()==="1",tables:rootStyle.getPropertyValue("--gradient-borders-tables").trim()==="1",cards:rootStyle.getPropertyValue("--gradient-borders-cards").trim()==="1"}},init:function(){const devMode=getComputedStyle(document.documentElement).getPropertyValue("--gradient-dev-mode").trim()==="1";if(devMode){console.log("\u{1F527} Gradient Dev Mode: ENABLED - localStorage overrides active");const savedSections=localStorage.getItem("gradient-sections");savedSections?this.sections=JSON.parse(savedSections):this.sections=this.getSectionSettings()}else console.log("\u2705 Gradient Production Mode: Using theme settings only"),this.sections=this.getSectionSettings(),localStorage.removeItem("gradient-sections"),localStorage.removeItem("gradient-mode");const borderSettings=this.getBorderSettings();Object.keys(borderSettings).forEach(section=>{devMode&&localStorage.getItem(`gradient_borders_${section}`)===null?localStorage.setItem(`gradient_borders_${section}`,borderSettings[section]):devMode||localStorage.removeItem(`gradient_borders_${section}`)}),this.isEnabled()&&this.enable(),devMode&&window.addEventListener("storage",function(e){e.key==="gradient-mode"?e.newValue==="true"?GradientSystem.enable():GradientSystem.disable():e.key==="gradient-sections"&&(GradientSystem.sections=JSON.parse(e.newValue),GradientSystem.updateSections())}),this.updateSections()},updateSections:function(){const body=document.body;body.setAttribute("data-gradient-body",this.sections.body),body.setAttribute("data-gradient-header",this.sections.header),body.setAttribute("data-gradient-footer",this.sections.footer),body.setAttribute("data-gradient-buttons",this.sections.buttons),body.setAttribute("data-gradient-drawers",this.sections.drawers),body.setAttribute("data-gradient-cards",this.sections.cards);const rootStyle=getComputedStyle(document.documentElement),btnBorderEnabled=rootStyle.getPropertyValue("--gradient-btn-border-enabled").trim()==="1",btnShadowEnabled=rootStyle.getPropertyValue("--gradient-btn-shadow-enabled").trim()==="1",btnBeforeEnabled=rootStyle.getPropertyValue("--gradient-btn-before-enabled").trim()==="1";body.setAttribute("data-gradient-btn-border",btnBorderEnabled),body.setAttribute("data-gradient-btn-shadow",btnShadowEnabled),body.setAttribute("data-gradient-btn-before",btnBeforeEnabled),btnShadowEnabled&&this.injectButtonShadows(),["sections","footer","collections","tables","cards"].forEach(section=>{const storedValue=localStorage.getItem(`gradient_borders_${section}`),enabled=storedValue==="true"||storedValue===!0;body.setAttribute(`data-gradient-borders-${section}`,enabled),console.log(`\u{1F3A8} Gradient border [${section}]: ${enabled} (value: ${storedValue})`)}),localStorage.setItem("gradient-sections",JSON.stringify(this.sections))},enable:function(){document.body.setAttribute("data-gradients","true"),document.body.classList.add("gradient-mode"),localStorage.setItem("gradient-mode","true"),this.updateSections(),window.dispatchEvent(new CustomEvent("gradientModeChanged",{detail:{enabled:!0,sections:this.sections}})),console.log("\u2728 Gradient mode enabled")},disable:function(){document.body.removeAttribute("data-gradients"),document.body.classList.remove("gradient-mode"),localStorage.setItem("gradient-mode","false"),window.dispatchEvent(new CustomEvent("gradientModeChanged",{detail:{enabled:!1}})),console.log("\u{1F3A8} Solid color mode enabled")},toggle:function(){document.body.classList.contains("gradient-mode")?this.disable():this.enable()},toggleSection:function(section,enabled){this.sections.hasOwnProperty(section)&&(this.sections[section]=enabled!==void 0?enabled:!this.sections[section],this.updateSections(),console.log(`${section} gradients: ${this.sections[section]?"enabled":"disabled"}`))},setGradient:function(name,startColor,endColor,angle="135deg"){const gradient=`linear-gradient(${angle}, ${startColor} 0%, ${endColor} 100%)`;document.documentElement.style.setProperty(`--gradient-${name}`,gradient),console.log(`Updated gradient: ${name}`)},createGradient:function(startColor,endColor,angle="135deg"){return`linear-gradient(${angle}, ${startColor} 0%, ${endColor} 100%)`},injectButtonShadows:function(){[".btn--primary",".btn-primary",".btn--secondary",".btn-secondary",".btn-outline-primary",".btn-outline-secondary"].forEach(selector=>{document.querySelectorAll(selector).forEach(btn=>{if(btn.querySelector(".gradient-btn-shadow"))return;const shadow=document.createElement("span");shadow.className="gradient-btn-shadow",shadow.setAttribute("aria-hidden","true"),btn.insertBefore(shadow,btn.firstChild)})}),console.log("\u2728 Gradient button shadows injected")}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){GradientSystem.init(
1)}):GradientSystem.init(),window.GradientSystem=GradientSystem})();
2//# sourceMappingURL=/cdn/shop/t/156/assets/gradient-system.js.map?v=9481125546569420891788489952

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.