a new start
This commit is contained in:
44
_includes/scripts/loadCSS.min.js
vendored
Normal file
44
_includes/scripts/loadCSS.min.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
!(function (a) {
|
||||
"use strict";
|
||||
var b = function (b, c, d) {
|
||||
function e(a) {
|
||||
return h.body
|
||||
? a()
|
||||
: void setTimeout(function () {
|
||||
e(a);
|
||||
});
|
||||
}
|
||||
function f() {
|
||||
i.addEventListener && i.removeEventListener("load", f),
|
||||
(i.media = d || "all");
|
||||
}
|
||||
var g,
|
||||
h = a.document,
|
||||
i = h.createElement("link");
|
||||
if (c) g = c;
|
||||
else {
|
||||
var j = (h.body || h.getElementsByTagName("head")[0]).childNodes;
|
||||
g = j[j.length - 1];
|
||||
}
|
||||
var k = h.styleSheets;
|
||||
(i.rel = "stylesheet"),
|
||||
(i.href = b),
|
||||
(i.media = "only x"),
|
||||
e(function () {
|
||||
g.parentNode.insertBefore(i, c ? g : g.nextSibling);
|
||||
});
|
||||
var l = function (a) {
|
||||
for (var b = i.href, c = k.length; c--; ) if (k[c].href === b) return a();
|
||||
setTimeout(function () {
|
||||
l(a);
|
||||
});
|
||||
};
|
||||
return (
|
||||
i.addEventListener && i.addEventListener("load", f),
|
||||
(i.onloadcssdefined = l),
|
||||
l(f),
|
||||
i
|
||||
);
|
||||
};
|
||||
"undefined" != typeof exports ? (exports.loadCSS = b) : (a.loadCSS = b);
|
||||
})("undefined" != typeof global ? global : this);
|
||||
Reference in New Issue
Block a user