1var LDR = (function (w, d) { 2 3 if (typeof CFG.DEVEL === 'undefined') CFG.DEVEL = false; 4 if (typeof CFG.MODULE === 'undefined') CFG.MODULE = 'index'; 5 if (typeof CFG.ajax_url === 'undefined') CFG.ajax_url = CFG.SITE.url+'/ajax'; 6 7 if (typeof CFG.js_url === 'undefined') CFG.js_url = CFG.SITE.url+'/js/'; 8 if (typeof CFG.css_url === 'undefined') CFG.css_url = CFG.SITE.url+'/css/'; 9 10 var VND_URL = CFG.SCRIPTS.VND_URL; 11 12 var _LD = { 13 14 DEVEL: CFG.DEVEL, //developer sau nu 15 LOADED: false, 16 17 dci: 0, 18 19 //defer css loader 20 dcl: [ 21 // [ 'main-css', CFG.STYLES.MAIN_CSS], 22 [ 'videojs', 'https://cdnjs.cloudflare.com/ajax/libs/video.js/8.0.2/video-js.min.css', true], 23 [ 'share-on', 'https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.min.css', true], 24 [ 'glightbox', 'https://cdnjs.cloudflare.com/ajax/libs/glightbox/3.2.0/css/glightbox.min.css', true ], 25 [ 'main-css', CFG.STYLES.MAIN_CSS], 26 ], 27 28 dcc: [], 29 30 dji: 0, 31 32 // defer js loader 33 // direct, se incarca dependintele required, necesare pe toate paginile, cum e bootstrap.js 34 // scripturile necesare pentru anumite componente, care nu apar pe toate paginile, se incarca ondemand 35 djl: [ 36 [ 'kernel-app', CFG.SCRIPTS.APP_SRC ], 37 [ 'main-js', CFG.SCRIPTS.MAIN_JS_SRC ], 38 [ 'jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js', true], 39 [ 'bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js' ], 40 [ 'glightbox', 'https://cdnjs.cloudflare.com/ajax/libs/glightbox/3.2.0/js/glightbox.min.js', true ], 41 [ 'slick-carousel', 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js', true], 42 [ 'lazysizes', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js', true], 43 [ 'share-on', 'https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.iife.js', true], 44 [ 'push', 'https://push.knd.ro/subscribe.php?from=' + CFG.SITE.id, true], 45 [ 'videojs', 'https://cdnjs.cloudflare.com/ajax/libs/video.js/8.0.2/video.min.js', true], 46 [ 'gsap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js', true], 47 [ 'ScrollTrigger', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/ScrollTrigger.min.js', true], 48 [ 'SplitText', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/SplitText.min.js', true] 49 ], 50 djc: [] 51 52 }; 53 54 switch (CFG.MODULE) { 55 case 'index': 56 case 'categories': 57 58 if (CFG.SITE.category == 'hot40') { 59 // _LD.djl.push(); 60 } 61 break; 62 63 case 'articles': 64 _LD.dcl.unshift([ 'main-css', CFG.STYLES.MAIN_CSS]); 65 break; 66 67 break; 68 default: break; 69 } 70 71 //ifadblock trigger onnetwork 72 window.isAdBlockDetected = !document.getElementById('AdSense')?.clientHeight ? true : false; 73 if (isAdBlockDetected) _LD.djl.push([ 'onnetwork', CFG.SCRIPTS.ONNETWORK, true]); 74 75 if (ADOSLOTS.hasOwnProperty('master') == false ) _LD.djl.push([ 'onnetwork.js', CFG.SCRIPTS.ONNETWORK]); 76 77 _LD.add_styles = function(s) { this.dcl = this.dcl.concat(s); if (_LD.LOADED) _LD.dcf(); }; 78 _LD.add_scripts = function(s, l) { this.djl = this.djl.concat(s); if (_LD.LOADED) _LD.djf(); }; 79 80 81 _LD.preload = (function() { 82 83 function _load(t) { 84 return function(u) { 85 var l = document.createElement("link"); 86 l.href = u; 87 l.rel = "preload"; 88 l.as = t; 89 document.head.appendChild(l); 90 } 91 } 92 93 return { 94 css: _load('style'), 95 js: _load('script'), 96 font: _load('font') 97 } 98 99 })(); 100 101 //_LD.preload.js(CFG.SCRIPTS.APP_SRC); 102 103 _LD.load = (function() { 104 105 // Function which returns a function: https://davidwalsh.name/javascript-functions 106 function _load(tag) { 107 108 return function(uid, url) { 109 // This promise will be used by Promise.all to determine success or failure 110 return new Promise(function(resolve, reject) { 111 112 var element = document.createElement(tag); 113 var parent = 'body'; 114 var attr = 'src'; 115 116 if (CFG.DEVEL) console.info('Loading', tag, uid, url); 117
118 element.id = tag+'-'+uid; 119 120 // Important success and error for the promise 121 element.onload = function() { 122 resolve(url); 123 }; 124 element.onerror = function() { 125 reject(url); 126 }; 127 128 // Need to set different attributes depending on tag type 129 switch(tag) { 130 case 'script': 131 element.async = true; 132 break; 133 case 'link': 134 element.type = 'text/css'; 135 element.rel = 'stylesheet'; 136 attr = 'href'; 137 parent = 'head'; 138 break; 139 } 140 141 // Inject into document to kick off loading 142 element[attr] = url; 143 document[parent].appendChild(element); 144 145 }); 146 }; 147 } 148 149 return { 150 css: _load('link'), 151 js: _load('script'), 152 img: _load('img') 153 } 154 155 })(); 156 157 _LD.dcf = function() { 158 159 if (_LD.dci == _LD.dcl.length) return _LD.dci; 160 161 if (!_LD.dcl[_LD.dci][2]) { 162 _LD.load.css(_LD.dcl[_LD.dci][0], _LD.dcl[_LD.dci][1]).then( 163 (function(dci) { 164 return function () { 165 _LD.dcc.push(_LD.dcl[dci][0]); } 166 ; } 167 )(_LD.dci) 168 ); 169 } 170 171 _LD.dci++; 172 _LD.dcf(); 173 174 }; 175 176 _LD.djf = function() { 177 178 if (_LD.dji == 0/* && CFG.MODULE == 'index' */) { _LD.dcf(); } 179 180 if (_LD.dji == _LD.djl.length) { 181 _LD.LOADED = true; 182 return _LD.dji; 183 } 184 185 if (_LD.djl[_LD.dji] && !_LD.djl[_LD.dji][2]) { 186 187 _LD.load.js(_LD.djl[_LD.dji][0], _LD.djl[_LD.dji][1]).then(function (scr) { 188 console.info('Script loaded', scr); 189 _LD.djc.push(_LD.djl[_LD.dji][0]); _LD.dji++; _LD.djf(); 190 }).catch(function (scr) { 191 if (CFG.DEVEL) console.error('Script not found', scr); 192 }); 193 194 } 195 else { 196 _LD.dji++; _LD.djf(); 197 } 198 199 }; 200 201 // window.addEventListener('load', function() { 202 // console.log('loaded'); 203 // }); 204 205 if (window.trueDCLfired && ( APP.isMobile.iOS() || APP.isMobile.Mac() ) ){ 206 _LD.djf(); 207 } else { 208 if (w.addEventListener) w.addEventListener("load", _LD.djf, true); 209 else if (w.attachEvent) w.attachEvent("onload", _LD.djf); 210 else w.onload = _LD.djf; 211 } 212 213 return _LD; 214 215})(window, document);
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.