1// This script can be used for loading JavaScript and CSS files for various pages. It automatically loads Prototype and Scriptaculous libraries. It is programmed to automatically load packed version of files in the production system. 2var ENLoader = { 3 4 // These are JavaScript file definitions. 5 // *** DON'T ADD THE "-pack.js" PARTS. This loader will automatically load 6 // packed version of files in the production system. 7 libs : { 8 AdminTools :"/apps/js/tools/admin_20080630", 9 AJAX :"/apps/ajax/ajax", 10 Album :"/apps/js/album3/p/public_album_20191108", 11 AlumniDirectory :"/apps/js/alumni_dir/alumni_dir_20090520", 12 Assignment :"/apps/js/classes/assignment_20100122", 13 BellSchedules :"/apps/js/bell_schedules/bell_schedules_20100810", 14 Class :"/apps/js/classes/class_20090821", 15 CodePress :"/apps/js/codepress/codepress", 16 CommentAdmin :"/apps-shared/js/comment/admin_20080702", 17 CommentPublic :"/apps-shared/js/comment/public_20080715", 18 Common :"/apps-shared/js/common/common_20131125", 19 CommonAdmin :"/apps/js/common/common_admin", 20 Compile :"/apps/js/common/compile_20080425", 21 Date :"/apps-shared/js/common/date_20150108", 22 DatePickerNT :"/apps-shared/js/common/date_picker_NT_20140128", 23 DatePicker :"/apps/js/common/date_picker", 24 DialogBoxes :"/apps-shared/js/dialog_boxes/dialog_boxes_20100827", 25 DonationFund :"/apps/js/donations/fund_20080630", 26 DonationIntro :"/apps/js/donations/intro_20080630", 27 ENCarousel : "/apps-shared/js/spotlight/encarousel_20151203", 28 ENCarouselv2 : "/apps-shared/js/spotlight/encarouselv2", 29 ENImageTrans : "/apps-shared/js/spotlight/enImageTransitions", 30 ENImageTransv2 : "/apps-shared/js/spotlight/enImageTransitionsv2", 31 ENRemoteService :"/apps-shared/js/EN/rpc/ENRemoteService_20090626", 32 ENTable :"/apps-shared/js/EN/util/ENTable", 33 ENUpload :"/apps-shared/js/EN/rpc/ENUpload_20200323", 34 Events :"/apps/js/events/events_20100825", 35 Facilities :"/apps/js/facilities/facilities_20140424b", 36 FacilitiesCom : "/apps-shared/js/facilities/facilities_com_20170803", 37 FileManager :"/apps/js/file_manager/file_manager_20080630", 38 FoodMenu :"/apps/js/food_menu/food_menu_20131010", 39 Forms :"/apps/js/forms/forms_20080630", 40 GoogleTranslate : "/apps-shared/js/google/translate_20190318", 41 Help :"/apps/js/common/help_20080627", 42 ImageTools :"/apps/js/image_tools/image_tools_20100913", 43 JQuery :"/apps-shared/js/jquery/1.2.1/jquery", 44 JQuery142 :"/apps/js/jquery/1.4.2/jquery", 45 JQuery143 :"/apps-shared/js/jquery/1.4.3/jquery", 46 JQuery191 :"/apps-shared/js/jquery/1.9.1/jquery", 47 JQuery1124 :"/apps-shared/js/jquery/1.12.4/jquery", 48 JQueryCache :"/apps-shared/js/jquery/jquery_cache", 49 JQueryClearField :"/apps/js/jquery/jquery_clearfield", 50 JQueryPlaceholder : "/apps-shared/js/mmapp/jquery.placeholder_20110119", 51 JQuerySimpleModal : "/apps-shared/js/mmapp/jquery.simplemodal-1.4.1_20110119", 52 JQueryUI :"/apps/js/jquery/jquery_ui", 53 JQueryUI1823 :"/apps-shared/js/jquery/jquery_ui_1823", 54 JQueryUI1103 :"/apps/js/jquery/ui/1.10.3/jquery_ui_1103", 55 JQueryUI1121 : "/apps-shared/js/jquery/ui/1.12.1/jquery_ui_1121", 56 JQueryBaHashChange :"/apps/js/jquery/jquery.ba-hashchange.min", 57 JQueryLazyLoad :"/apps/js/jquery/jquery.lazyload", 58 JQueryMigration141 :"/apps-shared/js/jquery/migration/1.4.1/jquery_migrate_141", 59 MM :"/apps/js/mm/mmprogress", 60 MMCheck : "/apps-shared/js/mmapp/mmCheck_20120510", 61 MuxJS:"/apps/js/shaka/2.4.0/mux", 62 News :"/apps/js/news/news_20100608", 63 P7_AutoLayers :"/apps/js/common/P7_AutoLayers", 64 Pages :"/apps/js/pages/pages_20151013", 65 PagesPublic :"/apps/js/pages/p/pages_public_20150211", 66 PhotoGrid :"/apps/js/photo_grid/photo_grid_20120606", 67 Polls :"/apps-shared/js/polls/polls", 68 PollsAdmin :"/apps/js/polls/polls_admin", 69 PollsAdminSettings :"/apps/js/polls/polls_admin_settings", 70 Prototype :"/apps/js/prototype/prototype-1.6.0.2", 71 PublicationsCategory :"/apps-shared/js/publications/category_20080630", 72 PublicationsDocument :"/apps-shared/js/publications/document_20080630", 73 PublicationsPublic :"/apps-shared/js/publications/public", 74 QC :"/apps-shared/js/qc/qc", 75 Richtext :"/apps/js/rte/richtext_20100830", 76 RotatingImages :"/apps/js/rotating_images/rotating_images_20110225", 77 Scriptaculous :"/apps/js/scriptaculous/scriptaculous",
78 Settings :"/apps/js/settings/settings_20170803", 79 Shaka:"/apps-shared/js/shaka/2.5.7/shaka-player.compiled", 80 SliderControl :"/apps/js/slider_control/slider_control_20110706", 81 SpNETClient : "/apps/js/sponsors/spnetclient_20090625", 82 SpSimple : "/apps-shared/js/spotlight/spsimple_20160609", 83 SpSimplev2 : "/apps-shared/js/spotlight/spsimplev2", 84 Staff :"/apps-shared/js/staff/staff_20080711", 85 StaffCatCom :"/apps-shared/js/staff_cat/staff_cat_com_20141118", 86 StaffList :"/apps-shared/js/staff/staff_list_20150121", 87 StaffPhotoCom :"/apps-shared/js/staff/staff_photo_com_20141118", 88 Store :"/apps-shared/js/store/store", 89 Thickbox :"/apps-shared/js/thickbox/3.1/thickbox", 90 Thickbox21 :"/apps/js/thickbox/2.1/thickbox", 91 Time :"/apps-shared/js/common/time", 92 TimeUtils :"/apps/js/common/timeutils_20100810", 93 TruView :"/apps/js/file_manager/truview_20090218", 94 Twitter : "/apps/js/twitter/twitter_20100721", 95 URL :"/apps/js/common/url", 96 VideoPane : "/apps-shared/js/mmapp/jquery.paneinitialize_20110119", 97 VideoInit : "/apps-shared/js/mmapp/jquery.videoinitialize_20191219", 98 VideoIndex : "/apps-shared/js/mmapp/video-index_20150120", 99 Webcam :"/apps/js/common/webcam" 100 }, 101 102 // These are CSS file definitions. 103 // *** DON'T ADD THE "-pack.css" PARTS. This loader will automatically load 104 // packed version of files in the production system. 105 css : { 106 Album :"/apps/js/album3/p/public_album_20141219", 107 BellSchedules :"/apps/js/bell_schedules/bell_schedules_20100715", 108 CommentAdmin :"/apps-shared/js/comment/admin_20080702", 109 CommentPublic :"/apps-shared/js/comment/public_20080715", 110 DatePicker :"/apps/js/common/date_picker", 111 DatePickerNT :"/apps/js/common/date_picker_NT", 112 DialogBoxes :"/apps-shared/js/dialog_boxes/dialog_boxes_20100827", 113 FacilitiesCom : "/apps-shared/js/facilities/facilities_com_20140424b", 114 GoogleTranslate : "/apps-shared/js/google/translate_20170810", 115 JQueryUI1103 :"/apps/js/jquery/ui/1.10.3/jquery_ui_1103", 116 PagesPublic :"/apps/js/pages/p/pages_public_20150223", 117 PhotoGrid :"/apps/js/photo_grid/photo_grid_20120606", 118 //Polls :"/apps/js/polls/polls", 119 PollsAdmin :"/apps/js/polls/polls_admin", 120 PollsAdminSettings :"/apps/js/polls/polls_admin_settings", 121 Richtext :"/apps/js/rte/rte", 122 RotatingImages :"/apps/js/rotating_images/rotating_images_20110225", 123 SliderControl :"/apps/js/slider_control/slider_control_20110706", 124 Staff :"/apps-shared/js/staff/staff_20080711", 125 StaffList :"/apps-shared/js/staff/staff_list_20150121", 126 StaffPhotoCom :"/apps-shared/js/staff/staff_photo_com_20141118", 127 Thickbox :"/apps/js/thickbox/3.1/thickbox" 128 }, 129 130 // Refresh rate of the animation in milliseconds. 131 refreshRate :100, 132 133 enLoaderContainerID : "enLoaderContainer", 134 135 enLoaderDiv : null, 136 137 antiCache : encodeURIComponent(document.currentScript.src.split("?")[1] || ""), 138 139 addAntiCache : function(src) { 140 return this.antiCache ? src + (src.indexOf("?") >= 0 ? "&" : "?") + "acn=" + this.antiCache : src; 141 }, 142 143 addLibs: function(libNames, onLoadcallback) { 144 145 if(document.libNames == null ) 146 document.libNames = new Array(); 147 if(document.onLoadCallback == null ) 148 document.onLoadCallback = ""; 149 if(document.loaded == null ) 150 document.loaded = ""; 151 if(document.notLoaded == null ) 152 document.notLoaded = ""; 153 if(document.debug == null ) 154 document.debug = false; 155 if(document.callbackFunctions == null ) 156 document.callbackFunctions = new Array(); 157 if(document.inputLibs == null ) 158 document.inputLibs = ""; 159 if(document.toBeLoadedLibs == null ) 160 document.toBeLoadedLibs = new Array(); 161 if(document.scriptedLibs == null ) 162 document.scriptedLibs = new Array(); 163 if(document.calledFunctions == null ) 164 document.calledFunctions = ""; 165 if(document.callbackFunctionsStr == null ) 166 document.callbackFunctionsStr = ""; 167 if(document.errorFunctions == null ) 168 document.errorFunctions = ""; 169 170 171 if (document.URL.indexOf("debug=true") >= 0) { 172 document.debug = true; 173 } 174 175 // Assign the libNames variables to the global variable. 176 if (libNames == null) 177 libNames = ""; 178 179 document.inputLibs = libNames + " " + document.inputLibs; 180 181 temp = libNames.split(" "); 182 for ( var i = 0; i < temp.length; i++) { 183 if(temp[i] == "JQuery" || temp[i] == "JQuery142" || temp[i] == "JQuery143") { 184 temp[i] = "JQuery143"; 185 } 186 if (temp[i] != "" && !ENLoader.checkInTBLList(temp[i]) && !ENLoader.checkInScrList(temp[i]) && document.loaded.indexOf(temp[i]) < 0) { 187 document.toBeLoadedLibs.push(temp[i]); 188 } 189 } 190 191 if(onLoadcallback != null) 192 document.callbackFunctionsStr += onLoadcallback + " "; 193 194 ENLoader.loadLibs(); 195 }, 196 197 checkInTBLList: function(libName) { 198 for(var j=0; j<document.toBeLoadedLibs.length; j++) { 199 if(document.toBeLoadedLibs[j] == libName){ 200 return true; 201 } 202 } 203 return false;
204 }, 205 206 checkInScrList: function(libName) { 207 for(var j=0; j<document.scriptedLibs.length; j++) { 208 if(document.scriptedLibs[j] == libName){ 209 return true; 210 } 211 } 212 return false; 213 }, 214 215 216 loadLibs: function() { 217 if ((document.toBeLoadedLibs.length == 0) && (document.callbackFunctionsStr == null || document.callbackFunctionsStr =="")) { 218 return; 219 } 220 221 var pack = "-pack"; 222 pack = ""; // Added to avoid loading packed versions. 223 if (document.URL.indexOf(".endev.org") >= 0 || document.URL.indexOf("debug=true") >= 0) { 224 pack = ""; 225 } 226 227 for(var i = 0; i < document.toBeLoadedLibs.length; i++) { 228 if(ENLoader.checkInScrList(document.toBeLoadedLibs[i])) { 229 document.toBeLoadedLibs[i] = ""; 230 continue; 231 } 232 233 var params = ""; 234 var libName = document.toBeLoadedLibs[i]; 235 try { 236 // If such a JS file exists, load it. Remember to load the packed 237 // version on the production system. 238 if (this.libs[libName]) 239 document.write("<" + "script type='text/javascript' src='" + 240 this.addAntiCache(this.libs[libName] + pack + ".js" + params) + "'><\/" + "script>"); 241 // If such a CSS file exists, load it. Remember to load the packed 242 // version on the production system. 243 if (this.css[libName]) 244 document.write("<link rel='stylesheet' href='" + 245 this.addAntiCache(this.css[libName] + pack + ".css") + 246 "' type='text/css' media='screen' />"); 247 } catch (e) { 248 console.log(e); 249 } 250 document.scriptedLibs.push(document.toBeLoadedLibs[i]); 251 document.toBeLoadedLibs[i] = ""; 252 } 253 254 temp = document.toBeLoadedLibs; 255 document.toBeLoadedLibs = new Array(); 256 for ( var i = 0; i < temp.length; i++) { 257 if (temp[i] != "") { 258 document.toBeLoadedLibs.push(temp[i]); 259 } 260 } 261 // Trigger the check function. 262 ENLoader.checkItems(); 263 }, 264 265 // This function ensures that all the requested libraries are loaded. 266 checkItems : function() { 267 // Treat the code of the page as an item as well. 268 var numNotLoaded = 0; 269 document.notLoaded = ""; 270 271 for ( var i = 0; i < document.scriptedLibs.length; i++) { 272 try { 273 try { 274 eval(document.scriptedLibs[i] + "IsLoaded()"); 275 } catch (e1) { 276 eval(document.scriptedLibs[i] + ".isLoaded()"); 277 } 278 if (document.loaded.indexOf(" " + document.scriptedLibs[i] + " ") < 0) 279 document.loaded += " " + document.scriptedLibs[i] + " "; 280 document.scriptedLibs[i] = ""; 281 } catch (e2) { 282 numNotLoaded++; 283 document.notLoaded += " " + document.scriptedLibs[i] + " "; 284 } 285 } 286 287 temp = document.scriptedLibs; 288 document.scriptedLibs = new Array(); 289 for ( var i = 0; i < temp.length; i++) { 290 if (temp[i] != "") { 291 document.scriptedLibs.push(temp[i]); 292 } 293 } 294 295 ENLoader.updateStatusDiv(); 296 297 // If successfully loaded, call the onLoadCallback function. 298 if (numNotLoaded == 0) { 299 if (document.callbackFunctionsStr != "") { 300 var temp = document.callbackFunctionsStr.split(" "); 301 document.callbackFunctionsStr = ""; 302 for ( var i = 0; i < temp.length; i++) { 303 if (temp[i] != "") { 304 document.callbackFunctions.push(temp[i]); 305 } 306 } 307 ENLoader.callOnLoadCallbackFunction(); 308 } 309 } 310 // Otherwise, run again... 311 else if (numNotLoaded != 0 ) { 312 setTimeout("ENLoader.checkItems()", this.refreshRate); 313 } 314 315 }, 316 317 callOnLoadCallbackFunction : function() { 318 temp = document.callbackFunctions; 319 document.callbackFunctions = new Array(); 320 for ( var i = 0; i < temp.length; i++) { 321 if (temp[i] != "") { 322 document.callbackFunctions.push(temp[i]); 323 } 324 } 325 326 document.errorFunctions = ""; 327 for ( var i = 0; i < document.callbackFunctions.length; i++) { 328 var callbackFunction = document.callbackFunctions[i]; 329 try { 330 eval(callbackFunction 331 + (callbackFunction.indexOf(")") == callbackFunction.length - 1 ? "" 332 : "()")); 333 document.calledFunctions += document.callbackFunctions[i] + " "; 334 document.callbackFunctions[i] = ""; 335 } catch (cc) { 336 document.errorFunctions += document.callbackFunctions[i] + " "; 337 setTimeout("ENLoader.callOnLoadCallbackFunction()", 50); 338 } 339 } 340 }, 341 342 updateStatusDiv : function() { 343 // Make sure div#enLoaderContainer is present... 344 if (this.enLoaderDiv == null) 345 this.enLoaderDiv = document.getElementById(this.enLoaderContainerID); 346 347 if (this.enLoaderDiv && (typeof(this.enLoaderDiv)).toString().toLowerCase() == "object" && document.debug) { 348 // Draw the animation frame by writing the HTML code into 349 // div#enLoaderContainer. 350 html = "<div style='font-size: 10pt;color: black;'><b>Libs Loaded: </b>" + document.loaded + "<br><b>Libs Not Loaded: </b>"+ document.notLoaded +"<br><b>Functions Called: </b>" + document.calledFunctions + "<br><b>Error Functions: </b>"+ document.errorFunctions +"</div>"; 351 this.enLoaderDiv.innerHTML = html; 352 this.enLoaderDiv.style.display = "block"; 353 } 354 }, 355 356 // This function can be called to ensure that ENLoader is loaded. This 357 // should be at the end of this file. 358 isLoaded : function() { 359 return true; 360 } 361};
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.