1// INJECTION DES CDN 2var cdnAssets = []; 3const CDN_ROOT_URL = "https://cdn.jsdelivr.net/npm/"; 4 5function callCDNAsset(header, aName, aVersion, aType, baseURL) { 6 var isCss = aType == 'css'; 7 if (typeof baseURL == 'undefined') { 8 if (aName == 'fontawesome') { 9 baseURL = CDN_ROOT_URL + "@fortawesome/" + aName + "-free@" + aVersion + "/" + aType + "/" + (isCss ? "all" : aName) + ".min."; 10 } else { 11 baseURL = CDN_ROOT_URL + aName + "@" + aVersion + "/dist/" + aType + "/" + aName + ".min."; 12 } 13 } 14 baseURL += aType; 15 var asset = isCss ? document.createElement('link') : document.createElement('script'); 16 asset.type = 'text/' + (isCss ? aType : 'javascript'); 17 if (isCss) { asset.rel = "stylesheet"; } 18 if (aName == 'fontawesome') { 19 isCss ? asset.href = baseURL : asset.src = baseURL; 20 } else { 21 isCss ? asset.href = baseURL : asset.src = baseURL; 22 } 23 header.appendChild(asset); 24 cdnAssets.push(aName + "." + aType); 25} 26 27function callCDN(header, aName, aVersion, aType) { 28 if (aType == null) { 29 callCDNAsset(header, aName, aVersion, 'css'); 30 callCDNAsset(header, aName, aVersion, 'js'); 31 } else { 32 callCDNAsset(header, aName, aVersion, aType); 33 } 34} 35 36//function callFACDN(header, aName, aVersion, aType) { 37// if (aType == null) { 38// //https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css 39// callCDNAsset(header, aName, aVersion, 'css'); 40// //https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/js/fontawesome.min.js 41// callCDNAsset(header, aName, aVersion, 'js'); 42// } 43// else { 44// callCDNAsset(header, aName, aVersion, aType); 45// } 46//} 47 48$(window).on('load', function () { 49 var head = document.getElementsByTagName('head')[0]; 50 51 if (dnn.getVar('includeBootstrap5') == 'true') { 52 // test de présence des assets 53 var bootstrap_enabled = (typeof $().modal == 'function'); 54 //if (!bootstrap_enabled) { 55 if (!$.fn.modal) { 56 // BS CDN 57 callCDN(head, "bootstrap", "5.0.2"); 58 //callFACDN(head, "font-awesome", "5.12.0", "css"); 59 60 //var bootstrap_ready = (typeof $().modal == 'function'); 61 //if (!bootstrap_ready) { 62 // // BS embedded 63 // //callCDN(head, "bootstrap", "5.0.2"); 64 // //callFACDN(head, "font-awesome", "5.12.0", "css"); 65 // //const ASSET_URL = dnn.getVar('baseURL') + "/" + "css" + "/" + "bootstrap" + ".min."; 66 // callCDNAsset(head, "bootstrap", "5.0.2", "css", dnn.getVar('baseURL') + "/" + "css" + "/" + "bootstrap" + ".min."); 67 // callCDNAsset(head, "bootstrap", "5.0.2", "js", dnn.getVar('baseURL') + "/" + "js" + "/" + "bootstrap" + ".min."); 68 //} 69 } 70 } 71 72 if (typeof currentPanel != "undefined" && currentPanel != "") { 73 $(currentPanel).collapse({ 74 toggle: true 75 }) 76 } 77});
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.