1(function () { 2 'use strict'; 3 4 if (localStorage.getItem("spruhadarktheme")) { 5 document.querySelector("html").setAttribute("data-theme-mode", "dark") 6 document.querySelector("html").setAttribute("data-menu-styles", "dark") 7 document.querySelector("html").setAttribute("data-header-styles", "dark") 8 } 9 if (localStorage.spruhartl) { 10 let html = document.querySelector('html'); 11 html.setAttribute("dir", "rtl"); 12 document.querySelector("#style")?.setAttribute("href", "../assets/libs/bootstrap/css/bootstrap.rtl.min.css"); 13 } 14 if (localStorage.getItem("spruhalayout") == "horizontal") { 15 document.querySelector("html").setAttribute("data-nav-layout", "horizontal") 16 } 17 18 if(localStorage.loaderEnable == 'true'){ 19 document.querySelector("html").setAttribute("loader","enable"); 20 }else{ 21 if(!document.querySelector("html").getAttribute("loader")){ 22 document.querySelector("html").setAttribute("loader","disable"); 23 } 24 } 25 26 function localStorageBackup() { 27 28 // if there is a value stored, update color picker and background color 29 // Used to retrive the data from local storage 30 if (localStorage.primaryRGB) { 31 if (document.querySelector('.theme-container-primary')) { 32 document.querySelector('.theme-container-primary').value = localStorage.primaryRGB; 33 } 34 document.querySelector('html').style.setProperty('--primary-rgb', localStorage.primaryRGB); 35 } 36 if (localStorage.bodyBgRGB && localStorage.bodylightRGB) { 37 if (document.querySelector('.theme-container-background')) { 38 document.querySelector('.theme-container-background').value = localStorage.bodyBgRGB; 39 } 40 document.querySelector('html').style.setProperty('--body-bg-rgb', localStorage.bodyBgRGB); 41 document.querySelector("html").style.setProperty("--body-bg-rgb2", localStorage.bodylightRGB); 42 document.querySelector('html').style.setProperty('--light-rgb', localStorage.bodylightRGB); 43 document.querySelector('html').style.setProperty('--form-control-bg', `rgb(${localStorage.bodylightRGB})`); 44 document.querySelector('html').style.setProperty('--input-border', "rgba(255,255,255,0.1)"); 45 document.querySelector('html').style.setProperty('--input-border', "rgba(255,255,255,0.1)"); 46 document.querySelector('html').style.setProperty('--sidemenu-active-bgcolor', `rgb(${localStorage.bodylightRGB})`); 47 let html = document.querySelector('html'); 48 html.setAttribute('data-theme-mode', 'dark'); 49 html.setAttribute('data-menu-styles', 'dark'); 50 html.setAttribute('data-header-styles', 'dark'); 51 } 52 if (localStorage.spruhadarktheme) { 53 let html = document.querySelector('html'); 54 html.setAttribute('data-theme-mode', 'dark'); 55 } 56 if (localStorage.spruhartl) { 57 let html = document.querySelector('html'); 58 html.setAttribute('dir', 'rtl'); 59 document.querySelector('#style').href = '../assets/libs/bootstrap/css/bootstrap.rtl.min.css' 60 setTimeout(() => { 61 rtlFn(); 62 }, 1000); 63 } 64 if (localStorage.spruhalayout) { 65 let html = document.querySelector('html'); 66 let layoutValue = localStorage.getItem('spruhalayout'); 67 html.setAttribute('data-nav-layout', 'horizontal'); 68 setTimeout(() => { 69 clearNavDropdown(); 70 }, 5000); 71 html.setAttribute('data-nav-style', 'menu-click'); 72 setTimeout(() => { 73 checkHoriMenu(); 74 }, 5000); 75 } 76 if (localStorage.spruhaverticalstyles) { 77 let html = document.querySelector('html'); 78 let verticalStyles = localStorage.getItem('spruhaverticalstyles'); 79 80 if (verticalStyles == 'closed') { 81 html.setAttribute('data-vertical-style', 'closed'); 82 localStorage.removeItem("spruhanavstyles") 83 } 84 if (verticalStyles == 'icontext') { 85 html.setAttribute('data-vertical-style', 'icontext'); 86 localStorage.removeItem("spruhanavstyles") 87 } 88 if (verticalStyles == 'overlay') { 89 html.setAttribute('data-vertical-style', 'overlay'); 90 localStorage.removeItem("spruhanavstyles") 91 } 92 if (verticalStyles == 'detached') { 93 html.setAttribute('data-vertical-style', 'detached'); 94 localStorage.removeItem("spruhanavstyles") 95 } 96 if (verticalStyles === "doublemenu") { 97 document.querySelector("html").setAttribute("data-vertical-style", "doublemenu"); 98 localStorage.removeItem("spruhanavstyles"); 99 setTimeout(() => { 100 const menuSlideItem = document.querySelectorAll(".main-menu > li > .side-menu__item"); 101 102 // Create the tooltip element 103 const tooltip = document.createElement("div"); 104 tooltip.className = "custom-tooltip"; 105 // Set the CSS properties of the tooltip element 106 tooltip.style.setProperty("position", "fixed"); 107 tooltip.style.setProperty("display", "none"); 108 tooltip.style.setProperty("padding", "0.5rem"); 109 tooltip.style.setProperty("font-weight", "500"); 110 tooltip.style.setProperty("font-size", "0.75rem"); 111 tooltip.style.setProperty("background-color", "rgb(15, 23 ,42)"); 112 tooltip.style.setProperty("color", "rgb(255, 255 ,255)"); 113 tooltip.style.setProperty("margin-inline-start", "48px"); 114 tooltip.style.setProperty("border-radius", "0.25rem"); 115 tooltip.style.setProperty("z-index", "99"); 116 117 menuSlideItem.forEach((e) => { 118 // Add an event listener to the menu slide item to show the tooltip 119 e.addEventListener("mouseenter", () => { 120 if (localStorage.getItem("spruhaverticalstyles") === "doublemenu") { 121 tooltip.style.setProperty("display", "block"); 122 tooltip.textContent = e.querySelector(".side-menu__label").textContent; 123 if ( 124 document.querySelector("html").getAttribute("data-vertical-style") === "doublemenu" 125 ) { 126 e.appendChild(tooltip); 127 } 128 } 129 }); 130 131 // Add an event listener to hide the tooltip 132 e.addEventListener("mouseleave", () => { 133 tooltip.style.setProperty("display", "none"); 134 tooltip.textContent = e.querySelector(".side-menu__label").textContent; 135 }); 136 }); 137 }, 1000); 138 } 139 } 140 if (localStorage.spruhanavstyles) { 141 let html = document.querySelector('html'); 142 let navStyles = localStorage.getItem('spruhanavstyles'); 143 if (navStyles == 'menu-click') { 144 html.setAttribute('data-nav-style', 'menu-click'); 145 localStorage.removeItem("spruhaverticalstyles"); 146 html.removeAttribute('data-vertical-style'); 147 } 148 if (navStyles == 'menu-hover') { 149 html.setAttribute('data-nav-style', 'menu-hover'); 150 localStorage.removeItem("spruhaverticalstyles"); 151 html.removeAttribute('data-vertical-style'); 152 }
153 if (navStyles == 'icon-click') { 154 html.setAttribute('data-nav-style', 'icon-click'); 155 localStorage.removeItem("spruhaverticalstyles"); 156 html.removeAttribute('data-vertical-style'); 157 } 158 if (navStyles == 'icon-hover') { 159 html.setAttribute('data-nav-style', 'icon-hover'); 160 localStorage.removeItem("spruhaverticalstyles"); 161 html.removeAttribute('data-vertical-style'); 162 } 163 } 164 if (localStorage.spruhaclassic) { 165 let html = document.querySelector('html'); 166 html.setAttribute('data-page-style', 'classic'); 167 } 168 if (localStorage.spruhamodern) { 169 let html = document.querySelector('html'); 170 html.setAttribute('data-page-style', 'modern'); 171 } 172 if (localStorage.spruhaboxed) { 173 let html = document.querySelector('html'); 174 html.setAttribute('data-width', 'boxed'); 175 } 176 if (localStorage.spruhaheaderfixed) { 177 let html = document.querySelector('html'); 178 html.setAttribute('data-header-position', 'fixed'); 179 } 180 if (localStorage.spruhaheaderscrollable) { 181 let html = document.querySelector('html'); 182 html.setAttribute('data-header-position', 'scrollable'); 183 } 184 if (localStorage.spruhamenufixed) { 185 let html = document.querySelector('html'); 186 html.setAttribute('data-menu-position', 'fixed'); 187 } 188 if (localStorage.spruhamenuscrollable) { 189 let html = document.querySelector('html'); 190 html.setAttribute('data-menu-position', 'scrollable'); 191 } 192 if (localStorage.spruhaMenu) { 193 let html = document.querySelector('html'); 194 let menuValue = localStorage.getItem('spruhaMenu'); 195 switch (menuValue) { 196 case 'light': 197 html.setAttribute('data-menu-styles', 'light'); 198 break; 199 case 'dark': 200 html.setAttribute('data-menu-styles', 'dark'); 201 break; 202 case 'color': 203 html.setAttribute('data-menu-styles', 'color'); 204 break; 205 case 'gradient': 206 html.setAttribute('data-menu-styles', 'gradient'); 207 break; 208 case 'transparent': 209 html.setAttribute('data-menu-styles', 'transparent'); 210 break; 211 default: 212 break; 213 } 214 } 215 if (localStorage.spruhaHeader) { 216 let html = document.querySelector('html'); 217 let headerValue = localStorage.getItem('spruhaHeader'); 218 switch (headerValue) { 219 case 'light': 220 html.setAttribute('data-header-styles', 'light'); 221 break; 222 case 'dark': 223 html.setAttribute('data-header-styles', 'dark'); 224 break; 225 case 'color': 226 html.setAttribute('data-header-styles', 'color'); 227 break; 228 case 'gradient': 229 html.setAttribute('data-header-styles', 'gradient'); 230 break; 231 case 'transparent': 232 html.setAttribute('data-header-styles', 'transparent'); 233 break; 234 235 default: 236 break; 237 } 238 } 239 if (localStorage.bgimg) { 240 let html = document.querySelector('html'); 241 let value = localStorage.getItem('bgimg'); 242 html.setAttribute('data-bg-img', value); 243 } 244 } 245 localStorageBackup() 246 247})();
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.