filesbox/web/dist/design/designstatic/newJS/common/js/loader.js
2024-07-26 14:10:54 +08:00

2 lines
1.2 KiB
JavaScript

(function(){const l=200;let n=[{url:"/design/designstatic/newJS/common/js/collect.js"}];const s=window.location.href;if((s.indexOf("/pages/")>-1||s.indexOf("/views/")>-1)&&(n=[{url:"/design/designstatic/lib/polyfill.min.js",async:!1},{url:"/design/designstatic/lib/artTemplate/template-web.js",async:!1,callback:function(){window.template&&(window.artTemplate=template)}},{url:"/design/designstatic/common/template/common.html?my_version=",callback:function(e){$("head").append(e)}},{url:"/design/designstatic/newJS/common/js/collect.js"}]),n=[{url:"/design/designstatic/lib/polyfill.min.js",async:!1},{url:"/design/designstatic/lib/artTemplate/template-web.js",async:!1,callback:function(){window.template&&(window.artTemplate=template)}},{url:"/design/designstatic/common/template/common.html?my_version=",callback:function(e){$("head").append(e)}},{url:"/design/designstatic/newJS/common/js/collect.js"},{url:"/design/designstatic/common/js/addSentry.js?my_version="}],window.$)t(n);else var c=setInterval(function(){window.$&&(clearInterval(c),t(n))},l);function t(e){Array.isArray(e)&&e.forEach(function(i){if(i){var o=i.url||"",r=i.async||!0,a=i.callback||"";$.ajax({url:o,async:r,success:function(d){a&&a(d)}})}})}})();