PageSourceSearch

https://www.karresenbrands.com/assets/js/general-min.js

js karresenbrands.com collected 2026-10-10 00:30:40 UTC 8,698 bytes, 195 lines download raw bytes

1function initDefault() {
2    FastClick.attach(document.body), initMenu(), initVimeo(), initProjectFilter();
3}
4function initMenu() {
5    $(".openMenu").click(function () {
6        if (($("#menu").toggleClass("active"), $(".breadcrumb").toggleClass("active"), $("#menu").hasClass("active"))) {
7            var e = $(".menuIcon").offset();
8            $(".whiteSurfer")
9                .css({ width: e.left + "px" })
10                .addClass("active"),
11                $(".hamburger").addClass("closedBurger");
12        } else $(".whiteSurfer").css({ width: "0px" }).removeClass("active"), $(".hamburger").removeClass("closedBurger");
13    }),
14        $(".subShow a").click(function () {
15            $("nav.sub").addClass("active");
16        }),
17        $(".subBack a").click(function () {
18            $("nav.sub").removeClass("active");
19        }),
20        $(".close a").click(function (e) {
21            e.preventDefault(), $("#menu").removeClass("active"), $(".breadcrumb").removeClass("active"), $(".whiteSurfer").css({ width: "0px" }).removeClass("active"), $("nav.sub").removeClass("active");
22        }),
23        $(window).resize(function () {
24            $("#menu").removeClass("active"), $(".breadcrumb").removeClass("active"), $(".whiteSurfer").css({ width: "0px" }).removeClass("active"), $("nav.sub").removeClass("active");
25        });
26}
27function initProjectFilter() {
28    var e = $(".projectOverviewHeader");
29    if (e.length > 0) {
30        var t = e.find(".mobile-toggler"),
31            i = e.find(".filters").find("li"),
32            a = e.parent().next();
33        function n() {
34            e.hasClass("open") ? (e.removeClass("open"), a.removeClass("open")) : (e.addClass("open"), a.addClass("open"));
35        }
36        a.click(function () {
37            n();
38        }),
39            i.click(function () {
40                n();
41            }),
42            t.click(function () {
43                n();
44            });
45    }
46}
47function placeImages() {
48    $(".redactional > p").each(function () {
49        $(this).has("img").length > 0 &&
50            ($("b").contents().unwrap(),
51                $(this).has("em").length > 0 && $(this).children("em").contents().unwrap(),
52                1 == $(this).children("img").length
53                    ? ($(this).children("img").addClass("large"), $(this).children("img").first().unwrap())
54                    : 2 == $(this).children("img").length
55                        ? ($(this).children("img").addClass("tiny"), $(this).wrapInner('<div class="clearfix"></div>'), $(this).children("div").unwrap())
56                        : ($(this).children("img").addClass("large"), $(this).children("img").first().unwrap()));
57    });
58}
59function initVimeo() {
60    $(".redactional iframe").each(function () {
61        $(this).wrap('<div class="embedContainer"></div>');
62    });
63}
64function initSemi() {
65    var e = $(window).height() - $("header").height() - 135;
66    275 > e && (e = 275),
67        $(".bottom_semi").css({ top: e + "px" }),
68        $(window).resize(function () {
69            var e = $(window).height() - $("header").height() - 135;
70            275 > e && (e = 275), $(".bottom_semi").css({ top: $(window).height() - $("header").height() - 135 + "px" });
71        }),
72        $(document).on("scroll", function () {
73            $(".bottom_semi").offset().top - $(window).scrollTop() <= 80 ? $("header").addClass("whoseLineIsIt") : $("header").removeClass("whoseLineIsIt");
74        });
75}
76function initFilters() {
77    window.location.hash ? ((current_cat = window.location.hash.substring(1)), $(".projectOverviewTitle h2").text(current_cat)) : (current_cat = "all"),
78        $(".chapters a").click(function (e) {
79            e.preventDefault(), $(".filterList").removeClass("active"), $($(this).attr("href")).addClass("active"), $(".chapters li").removeClass("active"), $(this).parent().addClass("active");
80        }),
81        $(".xfilterList a").click(function (e) {
82            if ((e.preventDefault(), !$(this).parent().hasClass("active"))) {
83                $(".filterList li").removeClass("active"), $(this).parent().addClass("active");
84                var t = $(this).attr("href");
85                $(".projectOverviewTitle h2").text($(this).text()),
86                    $(".projects").html(""),
87                    $(".projectLoaderFilters").addClass("active"),
88                    (initialLoad = 0),
89                    (current_cat = t),
90                    //loadNewEntries(0, current_cat),
91                    checkForEnd(),
92                    (window.location.hash = t);
93            }
94        });
95}
96
97function initPerCategoryOverview() {
98    if ($(".projectOverviewTitle h2").text()) {
99        current_cat = $(".projectOverviewTitle h2").text();
100    } else {
101        current_cat = "all";
102    }
103    $(".chapters a").click(function (e) {
104        e.preventDefault(), $(".filterList").removeClass("active"), $($(this).attr("href")).addClass("active"), $(".chapters li").removeClass("active"), $(this).parent().addClass("active");
105    }),
106        $(".filterList a").click(function (e) {
107            if ((e.preventDefault(), !$(this).parent().hasClass("active"))) {
108                $(".filterList li").removeClass("active"), $(this).parent().addClass("active");
109                var t = $(this).attr("href");
110                $(".projectOverviewTitle h2").text($(this).text()),
111                    $(".projects").html(""),
112                    $(".projectLoaderFilters").addClass("active"),
113                    (initialLoad = 0),
114                    (current_cat = t),
115                    //loadNewEntries(0, current_cat),
116                    checkForEnd(),
117                    (window.location.hash = t);
118            }
119        });
120}
121
122
123function initNews() {
124    $(".cd-popup-close").click(function (e) {
125        e.preventDefault(), $(".cd-popup").removeClass("is-visible");
126    });
127}
128function initGrid() {
129    $(".lazy").lazyload({ effect: "fadeIn", threshold: 500 });
130    var e = document.querySelector("#projectOverview");
131    new Packery(e, { itemSelector: ".projectNode", transitionDuration: 0 }),
132        $(window).resize(function () {
133            var e = document.querySelector("#projectOverview");
134            new Packery(e, { itemSelector: ".projectNode", transitionDuration: 0 });
135        });
136}
137function initGridLoad() {
138    adjustGrid(),
139        $(window).resize(function () {
140            adjustGrid();
141        }),
142        $(".testLoad").click(function () {
143            //loadNewEntries(12 * initialLoad);
144        }),
145        //loadNewEntries(0, current_cat),
146        checkForEnd();
147}
148function adjustGrid() {
149    var e = document.querySelector("#projectOverview");
150    new Packery(e, { itemSelector: ".projectNode", transitionDuration: 0 });
151}
152function checkForEnd() {
153    $(window).scroll(function () {
154        didScroll = !0;
155    });
156}
157/*
158function loadNewEntries(e, t) {
159    var language = $("#languageVersion").attr("data-language");
160    var thecat = $("#theCat").attr("data-category");
161    var theamount = $("#totalResults").attr("data-total");
162    console.log(language);
163    console.log(initialLoad);
164    console.log(theamount);
165    console.log(thecat);
166    console.log(current_cat);
167    counterdebounter++,
168        initialLoad >= 0 &&
169        (initialLoad > 0 && $(".projectLoader").addClass("active"),
170            $.ajax({ type: "POST", url: "/" + language + "/ajax/load_entries/" + t, data: { offset: e } }).done(function (e) {
171                previous = $("#totalResults").attr("data-total"),
172                $("#totalResults").remove(),
173                    $(".projects").append(e),
174                    previous != $("#totalResults").attr("data-total") ? initialLoad++ : (initialLoad = -1),
175                    checkForEnd(),
176                    adjustGrid(),
177                    (loading = !1),
178                    $(".projectLoader").removeClass("active"),
179                    $(".projectLoaderFilters").removeClass("active");
180            }));
181}
182var initialLoad = 0,
183    didScroll = !1,
184    loading = !1,
185    counterdebounter = 1,
186    main_url = "https://www.karresenbrands.com/";
187setInterval(function () {
188    didScroll &&
189        ((didScroll = !1),
190            loading ||
191            ($(window).width < 700
192                ? $(window).scrollTop() >= $(document).height() - $(window).height() - 950 && (loadNewEntries(12 * initialLoad, current_cat), (loading = !0))
193                : $(window).scrollTop() >= $(document).height() - $(window).height() - 200 && (loadNewEntries(12 * initialLoad, current_cat), (loading = !0))));
194}, 250);
195*/

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.