PageSourceSearch

https://strongheartshelpline.org/assets/js/min/site.min.js?updated=2021-05-04

js strongheartshelpline.org collected 2026-10-01 12:00:54 UTC 5,705 bytes, 126 lines download raw bytes

1function randomNumber(e, t) {
2    return Math.floor(Math.random() * (t - e)) + e;
3}
4function randomFrom(e) {
5    return e[Math.floor(Math.random() * e.length)];
6}
7function shuffle(e) {
8    for (var t, a, o = e.length; o; t = Math.floor(Math.random() * o), a = e[--o], e[o] = e[t], e[t] = a);
9    return e;
10}
11function addCommas(e) {
12    return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
13}
14function findInArray(e, t) {
15    let a = e.indexOf(t);
16    return a > -1 ? a : null;
17}
18function removeFromArray(e, t) {
19    for (var a = e.length - 1; a--; ) e[a] == t && e.splice(a, 1);
20}
21function percentOf(e, t) {
22    return 0 == e || 0 == t ? 0 : Math.round((100 * t) / e);
23}
24function trackEvent(e, t, a, o) {
25    o
26        ? (_paq.push(["trackEvent", e, t, a, o]), console.log("CATEGORY: " + e + ", ACTION:" + t + ", LABEL:" + a + ", VALUE:" + o))
27        : a
28        ? (_paq.push(["trackEvent", e, t, a]), console.log("CATEGORY: " + e + ", ACTION:" + t + ", LABEL:" + a))
29        : (_paq.push(["trackEvent", e, t]), console.log("CATEGORY: " + e + ", ACTION:" + t));
30}
31if (
32    ($("#HideSomeoneWatching").mouseover(function () {
33        $("#SomoneWatching").addClass("considering-removal");
34    }),
35    $("#HideSomeoneWatching").mouseleave(function () {
36        $("#SomoneWatching").removeClass("considering-removal");
37    }),
38    (function () {
39        $("#TopNav").addClass("fix-this on-screen");
40        $(window).scroll(function () {
41            var e = $(this).scrollTop();
42            e > 300 ? $("#TopNav").addClass("opaque") : $("#TopNav").removeClass("opaque"), e;
43        });
44    })(),
45    $("button[toggle-contact]").click(function () {
46        console.log('button clicked from JS');
47
48        // find new messenger chat iframe
49        $('#genesys-mxg-frame').fadeToggle();
50        console.log('attempt to fade toggle mxg frame');
51
52
53        const e = $(this).attr("toggle-contact");
54        $(this).toggleClass("active"),
55            $(this).siblings("button[toggle-contact]").toggleClass("off-canvas"),
56            $('.flyout[toggle-holds="' + e + '"]').toggleClass("active"),
57            "chat" == e && ($('[toggle-contact="chat"]').hasClass("active") ? (customPlugin.command("WebChat.open", getAdvancedConfig()), trackEvent("Chat", "Chat Started")) : customPlugin.command("WebChat.close", getAdvancedConfig()));
58    }),
59    $("#HideSomeoneWatching").click(function () {
60        $("#SomoneWatching").remove(), sessionStorage.setItem("hideSomeoneWatching", "true"), trackEvent("Someone Watching?", "Stripe Dismissed");
61    }),
62    "true" != sessionStorage.getItem("hideSomeoneWatching") && $("#SomoneWatching").addClass("visible"),
63    $("main").hasClass("articles"))
64) {
65    let e = 0,
66        t = 0;
67    $(".article-summaries .summary").each(function () {
68        e++;
69    }),
70        $(".stories-grid .story").each(function () {
71            t++;
72        }),
73        $("#ArticleCount").text(e),
74        $("#PersonalStoryCount").text(t),
75        e < 1 ? $("#NoArticleResults").addClass("visible") : $("#NoArticleResults").removeClass("visible");
76}
77function getAway() {
78    trackEvent("Get Away", "Get Away"), window.open("https://weather.com", "_newtab"), window.location.replace("https://google.com");
79}
80
81$("button[filter-to]").click(function () {
82    const e = $(this).attr("filter-to");
83    $(".filter-tags button").removeClass("active"), $('.filter-tags button[filter-to="' + e + '"').addClass("active"), $("[filter-text]").attr("filter-text", e), $("[filter-text]").text(e);
84    let t = 0;
85    $(".article-summaries .summary").each(function () {
86        "all" == e || e == $(this).attr("category") ? ($(this).show(), t++) : $(this).hide();
87    }),
88        $("#ArticleCount").text(t),
89        t < 1 ? $("#NoArticleResults").addClass("visible") : $("#NoArticleResults").removeClass("visible");
90    let a = 0;
91    $(".stories-grid .story").each(function () {
92        "all" == e || e == $(this).attr("category") ? ($(this).show(), a++) : $(this).hide();
93    }),
94        $("#PersonalStoryCount").text(a),
95        a < 1 ? $("#NoPersonalStoriesResults").addClass("visible") : $("#NoPersonalStoriesResults").removeClass("visible"),
96        trackEvent("Article Filter", "Articles Filtered To " + e, e);
97}),
98    $('[data-toggle="MobileMenu"]').click(function () {
99        $(this).toggleClass("active"), $('[data-contains="MobileMenu"]').slideToggle(600), $(this).hasClass("active") && ($("#TopNav").addClass("opaque"), trackEvent("TopNav", "Mobile Menu Toggle", "Mobile Menu Visible"));
100    }),
101    $("#EscapeHatch").click(function () {
102        getAway();
103    }),
104    $(document).keyup(function (e) {
105        27 == e.keyCode && getAway();
106    }),
107    $('[data-toggle="search bar"]').click(function () {
108        $(this).toggleClass("active"), $(this).hasClass("active") ? ($(".search-bar").addClass("visible"), $("#SearchQuery").focus()) : $(".search-bar").removeClass("visible");
109    }),
110    $("#SearchForm").submit(function () {
111        const e = $("#SearchQuery").val().toUpperCase();
112        let t = siteURL + "/search?q=" + e;
113        return trackEvent("Search", "Search Query", e), window.location.replace(t), !1;
114    }),
115    $("#SearchForm404").submit(function () {
116        const e = $("#SearchQuery404").val().toUpperCase();
117        let t = siteURL + "/search?q=" + e;
118        return trackEvent("Search", "Search Query", e), window.location.replace(t), !1;
119    }),
120    $(document).ready(function () {
121        if ($("main").hasClass("search-results")) {
122            const e = randomNumber(5, 100),
123                t = new URLSearchParams(window.location.search).get("q");
124            $('[data-holds="search results count"]').text(e), $('[data-holds="search term"]').text(t);
125        }
126    })

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.