rich-filemanager
Version:
Highly customizable open-source file manager
1 lines • 1.26 kB
JavaScript
!function(e,t){"function"==typeof define&&define.amd?define([],function(){return e.toast=t()}):"object"==typeof exports?module.exports=t():e.toast=t()}(this,function(){function e(){var e=document.getElementsByTagName("head")[0],n=function(t){if(e){if(t.length){for(var a,r,c=-1;a=t[++c];)if("string"==typeof a)o(a);else if("function"==typeof a){r=a;break}i(r,Array.prototype.slice.call(t,c+1))}}else setTimeout(function(){n(t)},50)},o=function(n){var o,i,r=/\.(\w+)$/.exec(n),c=/^\[(\w+)\](.+)/.exec(n);if(null!==c)o=c[1],n=c[2];else{if(null===r)return;o=r[1]}if(!(n in t))switch(t[n]=!1,o){case"js":i=document.createElement("script"),i.src=n,i.async=!1,e.appendChild(i);var f=navigator.appVersion.match(/MSIE (\d)/);null!==f&&parseInt(f[1],10)<9?i.onreadystatechange=function(){/ded|co/.test(this.readyState)&&(t[n]=!0,i.onreadystatechange=null)}:i.onload=function(){t[n]=!0,i.onload=null};break;case"css":i=document.createElement("link"),i.rel="styleSheet",i.href=n,e.appendChild(i),a(i,n);break;default:return void delete t[n]}},i=function(e,o){for(var a in t)if(!t[a])return void setTimeout(function(){i(e,o)},50);"function"==typeof e&&e(),n(o)},a=function(e,n){e.sheet||e.styleSheet?t[n]=!0:setTimeout(function(){a(e,n)},50)};n(arguments)}var t={};return e});