PageSourceSearch

https://www.intento.ch/wp-content/themes/the-simple/js/simple-loadCSS.js?ver=5.8.17

js intento.ch collected 2026-10-04 05:04:21 UTC 3,878 bytes, 104 lines download raw bytes

1/*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
2(function(w) {
3    "use strict";
4    /* exported loadCSS */
5    var loadCSS = function(href, before, media) {
6        // Arguments explained:
7        // `href` [REQUIRED] is the URL for your CSS file.
8        // `before` [OPTIONAL] is the element the script should use as a reference for injecting our stylesheet <link> before
9        // By default, loadCSS attempts to inject the link after the last stylesheet or script in the DOM. However, you might desire a more specific location in your document.
10        // `media` [OPTIONAL] is the media type or query of the stylesheet. By default it will be 'all'
11        var doc = w.document;
12        var ss = doc.createElement("link");
13        var ref;
14        if (before) {
15            ref = before;
16        } else {
17            var refs = (doc.body || doc.getElementsByTagName("head")[0]).childNodes;
18            ref = refs[refs.length - 1];
19        }
20
21        var sheets = doc.styleSheets;
22        ss.rel = "stylesheet";
23        ss.href = href;
24        // temporarily set media to something inapplicable to ensure it'll fetch without blocking render
25        ss.media = "only x";
26
27        // wait until body is defined before injecting link. This ensures a non-blocking load in IE11.
28        function ready(cb) {
29            if (doc.body) {
30                return cb();
31            }
32            setTimeout(function() {
33                ready(cb);
34            });
35        }
36        // Inject link
37        // Note: the ternary preserves the existing behavior of "before" argument, but we could choose to change the argument to "after" in a later release and standardize on ref.nextSibling for all refs
38        // Note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/
39        ready(function() {
40            ref.parentNode.insertBefore(ss, (before ? ref : ref.nextSibling));
41        });
42        // A method (exposed on return object for external use) that mimics onload by polling document.styleSheets until it includes the new sheet.
43        var onloadcssdefined = function(cb) {
44            var resolvedHref = ss.href;
45            var i = sheets.length;
46            while (i--) {
47                if (sheets[i].href === resolvedHref) {
48                    return cb();
49                }
50            }
51            setTimeout(function() {
52                onloadcssdefined(cb);
53            });
54        };
55
56        function loadCB() {
57            if (ss.addEventListener) {
58                ss.removeEventListener("load", loadCB);
59            }
60            ss.media = media || "all";
61        }
62
63        // once loaded, set link's media back to `all` so that the stylesheet applies once it loads
64        if (ss.addEventListener) {
65            ss.addEventListener("load", loadCB);
66        }
67        ss.onloadcssdefined = onloadcssdefined;
68        onloadcssdefined(loadCB);
69        return ss;
70    };
71
72
73
74    loadCSS(s_gb.theme_css + "mediaelementplayer.css");
75    loadCSS(s_gb.theme_css + "hoverex-all.css");
76    loadCSS(s_gb.theme_css + "vector-icons.css");
77    loadCSS(s_gb.theme_css + "all.min.css");
78    loadCSS(s_gb.theme_css + "linecon.css");
79    loadCSS(s_gb.theme_css + "lineaicon.css");
80    loadCSS(s_gb.theme_css + "steadysets.css");
81    loadCSS(s_gb.theme_css + "jquery.easy-pie-chart.css");
82    loadCSS(s_gb.theme_css + "odometer-theme-minimal.css");
83    loadCSS(s_gb.theme_css + "linearicons.css");
84    loadCSS(s_gb.theme_css + "snap.css");
85    loadCSS(s_gb.theme_css + "jquery.fullPage.css");
86    loadCSS(s_gb.theme_css + "simple-gutenberg.css");
87
88
89
90
91
92
93
94
95
96
97
98    // commonjs
99    if (typeof exports !== "undefined") {
100        exports.loadCSS = loadCSS;
101    } else {
102        w.loadCSS = loadCSS;
103    }
104}(typeof global !== "undefined" ? global : this));

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.