Files
v1.pivoine.art/_includes/scripts/loadCSS.min.js
2025-10-25 12:39:30 +02:00

45 lines
1.0 KiB
JavaScript

!(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);