PageSourceSearch

https://treelinejournal.com/wp-content/plugins/ultimate-social-media-icons/js/custom_ver-2.8.3.js

js treelinejournal.com collected 2026-09-26 07:51:24 UTC 31,440 bytes, 619 lines download raw bytes

1jQuery(document).ready(function (e) {
2    jQuery("#sfsi_floater").attr("data-top", jQuery(document).height());
3});
4
5function showErrorSuc(s, i, e) {
6    if ("error" == s) var t = "errorMsg";
7    else var t = "sucMsg";
8    return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
9        SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
10            SFSI("." + t).slideUp("slow");
11        }, 5e3), !1;
12}
13
14function beForeLoad() {
15    SFSI(".loader-img").show(), SFSI(".save_button >a").html("Saving..."), SFSI(".save_button >a").css("pointer-events", "none");
16}
17
18function sfsi_make_popBox() {
19    var s = 0;
20    SFSI(".sfsi_sample_icons >li").each(function () {
21            "none" != SFSI(this).css("display") && (s = 1);
22        }), 0 == s ? SFSI(".sfsi_Popinner").hide() : SFSI(".sfsi_Popinner").show(), "" != SFSI('input[name="sfsi_popup_text"]').val() ? (SFSI(".sfsi_Popinner >h2").html(SFSI('input[name="sfsi_popup_text"]').val()),
23            SFSI(".sfsi_Popinner >h2").show()) : SFSI(".sfsi_Popinner >h2").hide(), SFSI(".sfsi_Popinner").css({
24            "border-color": SFSI('input[name="sfsi_popup_border_color"]').val(),
25            "border-width": SFSI('input[name="sfsi_popup_border_thickness"]').val(),
26            "border-style": "solid"
27        }), SFSI(".sfsi_Popinner").css("background-color", SFSI('input[name="sfsi_popup_background_color"]').val()),
28        SFSI(".sfsi_Popinner h2").css("font-family", SFSI("#sfsi_popup_font").val()), SFSI(".sfsi_Popinner h2").css("font-style", SFSI("#sfsi_popup_fontStyle").val()),
29        SFSI(".sfsi_Popinner >h2").css("font-size", parseInt(SFSI('input[name="sfsi_popup_fontSize"]').val())),
30        SFSI(".sfsi_Popinner >h2").css("color", SFSI('input[name="sfsi_popup_fontColor"]').val() + " !important"),
31        "yes" == SFSI('input[name="sfsi_popup_border_shadow"]:checked').val() ? SFSI(".sfsi_Popinner").css("box-shadow", "12px 30px 18px #CCCCCC") : SFSI(".sfsi_Popinner").css("box-shadow", "none");
32}
33
34function sfsi_stick_widget(s) {
35    0 == initTop.length && (SFSI(".sfsi_widget").each(function (s) {
36        initTop[s] = SFSI(this).position().top;
37    }));
38    var i = SFSI(window).scrollTop(),
39        e = [],
40        t = [];
41    SFSI(".sfsi_widget").each(function (s) {
42        e[s] = SFSI(this).position().top, t[s] = SFSI(this);
43    });
44    var n = !1;
45    for (var o in e) {
46        var a = parseInt(o) + 1;
47        e[o] < i && e[a] > i && a < e.length ? (SFSI(t[o]).css({
48            position: "fixed",
49            top: s
50        }), SFSI(t[a]).css({
51            position: "",
52            top: initTop[a]
53        }), n = !0) : SFSI(t[o]).css({
54            position: "",
55            top: initTop[o]
56        });
57    }
58    if (!n) {
59        var r = e.length - 1,
60            c = -1;
61        e.length > 1 && (c = e.length - 2), initTop[r] < i ? (SFSI(t[r]).css({
62            position: "fixed",
63            top: s
64        }), c >= 0 && SFSI(t[c]).css({
65            position: "",
66            top: initTop[c]
67        })) : (SFSI(t[r]).css({
68            position: "",
69            top: initTop[r]
70        }), c >= 0 && e[c] < i);
71    }
72}
73
74function sfsi_float_widget(s) {
75
76    function i() {
77        r = "Microsoft Internet Explorer" === navigator.appName ? a - document.documentElement.scrollTop : a - window.pageYOffset,
78            Math.abs(r) > 0 ?
79            (window.removeEventListener("scroll", i),
80                a -= r * o,
81                SFSI("#sfsi_floater").css({
82                    top: Math.round((a + t).toString()) + "px",
83                    transition: "all 0.6s ease 0s"
84                }),
85                setTimeout(i, n)) :
86            window.addEventListener("scroll", i, !1);
87    }
88
89    function e() {
90        var documentheight = SFSI("#sfsi_floater").attr("data-top");
91        var fltrhght = parseInt(SFSI("#sfsi_floater").height());
92        var fltrtp = parseInt(SFSI("#sfsi_floater").css("top"));
93
94        if (parseInt(fltrhght) + parseInt(fltrtp) <= documentheight) {
95            window.addEventListener("scroll", i, !1);
96        } else {
97            window.removeEventListener("scroll", i);
98            SFSI("#sfsi_floater").css("top", documentheight + "px");
99        }
100    }
101    if ("center" == s) {
102        var t = (SFSI(window).height() - SFSI("#sfsi_floater").height()) / 2;
103    } else if ("bottom" == s) {
104        var t = window.innerHeight - (SFSI("#sfsi_floater").height() + parseInt(SFSI('#sfsi_floater').css('margin-bottom')));
105    } else {
106        var t = parseInt(s);
107    }
108
109    var n = 50,
110        o = .1,
111        a = 0,
112        r = 0;
113    SFSI("#sfsi_floater");
114
115    var prev_onscroll = window.onscroll;
116
117    window.onscroll = function () {
118
119        if ('function' === typeof prev_onload) {
120            prev_onload(), e();
121        } else {
122            e();
123        }
124    }
125}
126
127function sfsi_shuffle() {
128    var $ = window.jQuery;
129
130    return SFSI('.sfsi_wDiv').each(function (index, container) {
131        var s = [];
132        s = SFSI(container).find(".sfsi_wicons ");
133        s = Shuffle(s);
134        SFSI(container).html("");
135        for (var i = 0; i < s.length; i++) {
136            SFSI(s[i]).css('transform', 'none');
137            SFSI(s[i]).css('position', 'relative');
138            SFSI(container).append(s[i]);
139        }
140    })
141
142}
143
144function Shuffle(s) {
145    for (var i, e, t = s.length; t; i = parseInt(Math.random() * t), e = s[--t], s[t] = s[i], s[i] = e);
146    return s
147}
148
149function sfsi_setCookie(s, i, e) {
150    var t = new Date();
151    t.setTime(t.getTime() + 1e3 * 60 * 60 * 24 * e);
152    var n = "expires=" + t.toGMTString();
153    document.cookie = s + "=" + i + "; " + n;
154}
155
156function sfsfi_getCookie(s) {
157    for (var i = s + "=", e = document.cookie.split(";"), t = 0; t < e.length; t++) {
158        var n = e[t].trim();
159        if (0 == n.indexOf(i)) return n.substring(i.length, n.length);
160    }
161    return "";
162}
163
164function sfsi_hideFooter() {}
165
166window.onerror = function () {
167    jQuery("#sfpageLoad").fadeOut(2e3);
168}, SFSI = jQuery, SFSI(window).on('load', function () {
169    SFSI("#sfpageLoad").fadeOut(2e3);
170
171    if (jQuery('#sfsi_tifm_scroll_value').val()) {
172      jQuery('.sfsi_tifm_module_menu_block').click();
173      setTimeout(function () {
174        document.querySelector('.sfsi_tifm_tab_module_block').scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
175      }, 300);
176    }
177});
178
179var global_error = 0;
180
181SFSI(document).ready(function (s) {
182    //changes done {Monad}
183    //putting it before to make sure it registers before the mobile click function
184    SFSI(document).on('click', '.inerCnt a[href=""]', function (event) {
185        //check if not mobile
186        if (!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) {
187            event.preventDefault();
188        }
189    });
190
191    SFSI("head").append('<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />'),
192        SFSI("head").append('<meta http-equiv="Pragma" content="no-cache" />'), SFSI("head").append('<meta http-equiv="Expires" content="0" />'),
193        SFSI(document).click(function (s) {
194
195            var i = SFSI(".sfsi_FrntInner"),
196                e = SFSI(".sfsi_wDiv"),
197                t = SFSI("#at15s");
198            i.is(s.target) || 0 !== i.has(s.target).length || e.is(s.target) || 0 !== e.has(s.target).length || t.is(s.target) || 0 !== t.has(s.target).length || i.fadeOut();
199        }), SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseover(function () {
200            SFSI(this).css("opacity", "0.9");
201        }), SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseleave(function () {
202            SFSI(this).css("opacity", "1");
203        }), SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseover(function () {
204            SFSI(this).css("opacity", "0.9");
205        }), SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseleave(function () {
206            SFSI(this).css("opacity", "1");
207        }), SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseover(function () {
208            SFSI(this).css("opacity", "0.9");
209        }), SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseleave(function () {
210            SFSI(this).css("opacity", "1");
211            /*{Monad}*/
212        }), SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseover(function () {
213            SFSI(this).css("opacity", "0.9");
214        }), SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseleave(function () {
215            SFSI(this).css("opacity", "1");
216        }), SFSI(".pop-up").on("click", function () {
217            ("fbex-s2" == SFSI(this).attr("data-id") || "linkex-s2" == SFSI(this).attr("data-id")) && (SFSI("." + SFSI(this).attr("data-id")).hide(),
218                SFSI("." + SFSI(this).attr("data-id")).css("opacity", "1"), SFSI("." + SFSI(this).attr("data-id")).css("z-index", "1000")),
219            SFSI("." + SFSI(this).attr("data-id")).show("slow");
220        }), /*SFSI("#close_popup").live("click", function() {*/ SFSI(document).on("click", '#close_popup', function () {
221            SFSI(".read-overlay").hide("slow");
222        });
223    var e = 0;
224    sfsi_make_popBox(), SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("keyup", sfsi_make_popBox),
225        SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("focus", sfsi_make_popBox),
226        SFSI("#sfsi_popup_font ,#sfsi_popup_fontStyle").on("change", sfsi_make_popBox),
227        /*SFSI(".radio").live("click", function() {*/
228
229    SFSI(document).on("click", '.radio', function () {
230            var s = SFSI(this).parent().find("input:radio:first");
231            "sfsi_popup_border_shadow" == s.attr("name") && sfsi_make_popBox();
232        }),
233
234        /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? SFSI(document).on("click", 'img.sfsi_wicon',function (s) {
235            /*console.log('document mouse click', s, s.target);*/
236
237            if (SFSI(s.target).parent().attr('href') == "") {
238                s.preventDefault();
239            }
240            if (!SFSI(this).hasClass('sfsi_click_wicon')) {
241                s.stopPropagation && s.stopPropagation();
242            }
243            var i = SFSI("#sfsi_floater_sec").val();
244            SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
245                SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
246                    SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
247                SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
248                    "z-index": "999"
249                }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
250                    opacity: 1,
251                    "z-index": 10
252                }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
253                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
254                        opacity: 1,
255                        "z-index": 10
256                    }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
257                    SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
258                        opacity: 1,
259                        "z-index": 10
260                    }
260)), ("top-left" == i || "top-right" == i) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
261                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
262                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
263                        opacity: 1,
264                        "z-index": 10
265                    }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
266                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
267                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
268                        opacity: 1,
269                        "z-index": 1e3
270                    }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
271        }) : SFSI(document).on("mouseenter", "img.sfsi_wicon", function () {
272            /*console.log('img mouseenter');*/
273            var s = SFSI("#sfsi_floater_sec").val();
274            SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
275                SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
276                    SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
277                SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
278                    "z-index": "999"
279                }), SFSI(this).parent().css({
280                    "opacity": "1"
281                }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
282                    opacity: 1,
283                    "z-index": 10
284                }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
285                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
286                        opacity: 1,
287                        "z-index": 10
288                    }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
289                    SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
290                        opacity: 1,
291                        "z-index": 10
292                    })), ("top-left" == s || "top-right" == s) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
293                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
294                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
295                        opacity: 1,
296                        "z-index": 10
297                    }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
298                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
299                    SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
300                        opacity: 1,
301                        "z-index": 10
302                    }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
303        }),
304        SFSI(document).on("mouseleave", "div.sfsi_wicons", function () {
305            SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "fade_in" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
306                SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "scale" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale"),
307                SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "combo" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale").css("opacity", "0.6"),
308            SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("display", "none"),
309            SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("opacity", "0");
310        }), SFSI("body").on("click", function (e) {
311            var target = SFSI( e.target );
312            if ( ! target.is( ".sfsi_wicon" ) ) {
313                SFSI(".inerCnt").find("div.sfsi_tool_tip_2").hide();
314            }
315
316        }), SFSI(".adminTooltip >a").on("hover", function () {
317            SFSI(this).offset().top, SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "1"),
318                SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").show();
319        }), SFSI(".adminTooltip").on("mouseleave", function () {
320            "none" != SFSI(".gpls_tool_bdr").css("display") && 0 != SFSI(".gpls_tool_bdr").css("opacity") ? SFSI(".pop_up_box ").on("click", function () {
321                SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"), SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide();
322            }) : (SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"),
323                SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide());
324        }), SFSI(".expand-area").on("click", function () {
325            "Read more" == SFSI(this).text() ? (SFSI(this).siblings("p").children("label").fadeIn("slow"),
326                SFSI(this).text("Collapse")) : (SFSI(this).siblings("p").children("label").fadeOut("slow"),
327                SFSI(this).text("Read more"));
328        }), SFSI(".sfsi_wDiv").length > 0 && setTimeout(function () {
329            var s = parseInt(SFSI(".sfsi_wDiv").height()) + 15 + "px";
330            SFSI(".sfsi_holders").each(function () {
331                SFSI(this).css("height", s);
332                SFSI(".sfsi_widget");
333            });
334        }, 200);
335
336        /* Admin forum notification */
337        SFSI( '.usm-widget__footer-text-link' ).on( 'click', function () {
338            SFSI( this ).parents( '.usm-widget' ).toggle( 'usm-widget--open' );
339
340            SFSI.ajax({
341                type: "post",
342                dataType: "json",
343                url: sfsi_icon_ajax_object.ajax_url,
344                data : { action: "sfsi_hide_admin_forum_notification" },
345                success: function(){
346                    SFSI( '.usm-widget' ).remove();
347                }
348            });
349        });
350
351        /* Hide Admin forum notification popup */
352        SFSI( '.usm-widget__toggle-btn' ).on( 'click', function () {
353            var currentThis = SFSI( this );
354            currentThis.parents( '.usm-widget' ).toggleClass( 'usm-widget--open' );
355            var toggleStatus = '';
356            if( currentThis.parents( '.usm-widget' ).hasClass( 'usm-widget--open' ) ) {
357                toggleStatus = 'hide';
358            } else {
359                toggleStatus = 'show';
360            }
361            SFSI.ajax({
362                type: "post",
363                dataType: "json",
364                url: sfsi_icon_ajax_object.ajax_url,
365                data : { action: "sfsi_default_hide_admin_notification", status: toggleStatus },
366                success: function(){
367                    currentThis.addClass( 'sfsi-first-click-enabled' );
368                }
369            });
370        });
371});
372
373//hiding popup on close button
374function sfsihidemepopup() {
375    SFSI(".sfsi_FrntInner_chg").fadeOut();
376}
377var initTop = new Array();
378
379function close_overlay(selector) {
380    if (typeof selector === "undefined") {
381        selector = '.sfsi_overlay';
382    }
383    jQuery(selector).removeClass('show').addClass('hide').hide();
384}
385
386function sfsi_wechat_share(url) {
387    if (jQuery('.sfsi_wechat_follow_overlay').length == 0) {
388        jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'>
388<div class='sfsi_inner_display'><a class='close_btn' href='' onclick='event.preventDefault();close_overlay(\".sfsi_wechat_follow_overlay\")' >×</a><div style='width:95%;max-width:500px; min-height:80%;background-color:#fff;margin:0 auto;margin:10% auto;padding: 20px 0;'><div style='width:90%;margin: 0 auto;text-align:center'><div class='sfsi_wechat_qr_display' style='display:inline-block'></div></div><div style='width:80%;margin:10px auto 0 auto;text-align:center;font-weight:900;font-size:25px;'>\"Scan QR Code\" in WeChat and press ··· to share!</div></div></div>");
389        new QRCode(jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display')[0], encodeURI(decodeURI(window.location.href)))
390        jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display img').attr('nopin', 'nopin')
391    } else {
392        jQuery('.sfsi_wechat_follow_overlay').removeClass('hide').addClass('show').show();
393    }
394}
395
396function sfsi_mobile_wechat_share(url) {
397    if (jQuery('.sfsi_wechat_follow_overlay').length == 0) {
398        jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'><div class='sfsi_inner_display'><a class='close_btn' href='' onclick=\"event.preventDefault();close_overlay(\'.sfsi_wechat_follow_overlay\')\" >×</a><div style='width:95%; min-height:80%;background-color:#fff;margin:0 auto;margin:30% auto;padding: 20px 0;'><div style='width:90%;margin: 0 auto;'><input type='text' value='" + encodeURI(decodeURI(window.location.href)) + "' style='width:100%;padding:7px 0;text-align:center' /></div><div style='width:80%;margin:10px auto 0 auto'><div  class='sfsi_upload_butt_container' ><button onclick='sfsi_copy_text_parent_input(event)' class='upload_butt' >Copy</button></div><div class='sfsi_upload_butt_container' ><a href='weixin://' class='upload_butt'>Open WeChat</a></div></div></div></div>");
399    } else {
400        jQuery('.sfsi_wechat_scan').removeClass('hide').addClass('show');
401    }
402}
403
404function sfsi_copy_text_parent_input(event) {
405    var target = jQuery(event.target);
406    /*console.log(target);*/
407    input_target = target.parent().parent().parent().find('input');
408    input_target.select();
409    document.execCommand('copy');
410}
411
412function sfsi_responsive_toggle() {
413    jQuery(document).scroll(function ($) {
414        var y = jQuery(this).scrollTop();
415        if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
416            if (jQuery(window).scrollTop() + jQuery(window).height() >= jQuery(document).height() - 100) {
417                jQuery('.sfsi_outr_div').css({
418                    'z-index': '9996',
419                    opacity: 1,
420                    top: jQuery(window).scrollTop() + "px",
421                    position: "absolute"
422                });
423                jQuery('.sfsi_outr_div').fadeIn(200);
424                jQuery('.sfsi_FrntInner_chg').fadeIn(200);
425            } else {
426                jQuery('.sfsi_outr_div').fadeOut();
427                jQuery('.sfsi_FrntInner_chg').fadeOut();
428            }
429        } else {
430            if (jQuery(window).scrollTop() + jQuery(window).height() >= jQuery(document).height() - 3) {
431                jQuery('.sfsi_outr_div').css({
432                    'z-index': '9996',
433                    opacity: 1,
434                    top: jQuery(window).scrollTop() + 200 + "px",
435                    position: "absolute"
436                });
437                jQuery('.sfsi_outr_div').fadeIn(200);
438                jQuery('.sfsi_FrntInner_chg').fadeIn(200);
439            } else {
440                jQuery('.sfsi_outr_div').fadeOut();
441                jQuery('.sfsi_FrntInner_chg').fadeOut();
442            }
443        }
444    });
445}
446
447function createCookie(name, value, expires, path, domain) {
448    var cookie = name + "=" + escape(value) + ";";
449  
450    if (expires) {
451      // If it's a date
452      if(expires instanceof Date) {
453        // If it isn't a valid date
454        if (isNaN(expires.getTime()))
455         expires = new Date();
456      }
457      else
458        expires = new Date(new Date().getTime() + parseInt(expires) * 1000 * 60 * 60 * 24);
459  
460      cookie += "expires=" + expires.toGMTString() + ";";
461    }
462  
463    if (path)
464      cookie += "path=" + path + ";";
465    if (domain)
466      cookie += "domain=" + domain + ";";
467  
468    document.cookie = cookie;
469  }
470
471function sfsi_time_pop_up(time_popUp) {
472    jQuery(document).ready(function ($) {
473        try{
474            // Check if cookie exists
475            if (document.cookie.indexOf('sfsi_popup') !== -1) {
476                return;
477            }
478
479            // If it doesn't exist, create it
480            createCookie('sfsi_popup', new Date.getTime(), 30, '/');
481        } catch(Exception) {
482            // Do nothing
483        }
484
485        setTimeout(function () {
486            jQuery('.sfsi_outr_div').css({
487                'z-index': '1000000',
488                opacity: 1
489            });
490            jQuery('.sfsi_outr_div').fadeIn(200);
491            jQuery('.sfsi_FrntInner_chg').fadeIn(200);
492        }, time_popUp);
493    });
494}
495
496function sfsi_social_pop_up(time_popUp) {
497    jQuery(document).ready(function ($) {
498        //jQuery('.sfsi_outr_div').fadeIn();
499        try{
500            // Check if cookie exists
501            if (document.cookie.indexOf('sfsi_socialPopUp') !== -1) {
502                return;
503            }
504
505            // If it doesn't sfsi_socialPopUp, create it
506            createCookie('sfsi_popup', new Date.getTime(), 30, '/');
507        } catch(Exception) {
508            // Do nothing
509        }
510
511        setTimeout(function () {
512            jQuery('.sfsi_outr_div').css({
513                'z-index': '1000000',
514                opacity: 1
515            });
516            jQuery('.sfsi_outr_div').fadeIn();
517        }, time_popUp);
518    });
519}
520
521function sfsi_plugin_version(pluginVersion) {
522    jQuery(document).ready(function (e) {
523        jQuery("body").addClass("sfsi_" + pluginVersion)
524    });
525}
526
527function sfsi_widget_set() {
528    jQuery(".sfsi_widget").each(function (index) {
529        if (jQuery(this).attr("data-position") == "widget") {
530            var wdgt_hght = jQuery(this).children(".norm_row.sfsi_wDiv").height();
531            var title_hght = jQuery(this).parent(".widget.sfsi").children(".widget-title").height();
532            var totl_hght = parseInt(title_hght) + parseInt(wdgt_hght);
533            jQuery(this).parent(".widget.sfsi").css("min-height", totl_hght + "px");
534            /*console.log('widget');*/
535        }
536    });
537}
538
539SFSI(window).on('load', function () {
540    SFSI('.sfsi_pinterest_sm_click').on('click touchstart', function () {
541        sfsi_pinterest_modal_images(e);
542    });
543});
544
545function sfsi_pinterest_modal_images(event, url, title) {
546    /*console.log(event);*/
547    event && event.preventDefault();
548    var imgSrc = [];
549    var page_title;
550
551    page_title = SFSI('meta[property="og:title"]').attr('content');
552    if (undefined == page_title) {
553        page_title = SFSI('head title').text();
554    }
555    if (undefined == title) {
556        title = page_title;
557    }
558    if (undefined == url) {
559        url = window.location.href;
560        // url = encodeURIComponent(window.location.href);
561    }
562    SFSI('body img').each(function (index) {
563        var src = SFSI(this).attr('src') || "";
564        var height = SFSI(this).height();
565        var width = SFSI(this).width();
566        var image_title = SFSI(this).attr('title') || "";
567        var alt = SFSI(this).attr('alt') || "";
568        var no_pin = SFSI(this).attr('data-pin-nopin') || "";
569        var no_pin_old = SFSI(this).attr('nopin') || "";
570
571        if (src !== "" && !src.startsWith("javascript") && height > 100 && width > 100 && no_pin_old !== "nopin" && no_pin !== "true") {
572            imgSrc.push({
573                src: src,
574                title: title && "" !== title ? title : (image_title && "" !== image_title ? image_title : alt)
575            });
576        }
577    });
578
579    sfsi_pinterest_modal();
580    if (imgSrc.length == 0) {
581        var meta_img = SFSI('meta[property="og:image"]').attr('content');
582        if (undefined == meta_img) {
583            meta_img = "";
584        }
585        SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + url + '&media=&description=' + encodeURIComponent(page_title).replace('+', '%20').replace("#", "%23") + '"><div style="width:140px;height:90px;display:inline-block;" ></div><span class="sfsi_pinterest_overlay"><img data-pin-nopin="true" height="30" width="30" src="' + window.sfsi_icon_ajax_object.plugin_url + '/images/pinterest.png" /></span></a></div>')
586    } else {
587
588        SFSI.each(imgSrc, function (index, val) {
589            SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + url + '&media=' + val.src + '&description=' + encodeURIComponent(val.title ? val.title : page_title).replace('+', '%20').replace("#", "%23") + '"><img style="display:inline"  data-pin-nopin="true" src="' + val.src + '"><span class="sfsi_pinterest_overlay" style="width:140px;left:unset;"><img data-pin-nopin="true" height="30" width="30" style="display:inline" src="' + window.sfsi_icon_ajax_object.plugin_url + '/images/pinterest.png" /></span></a></div>');
590        });
591    }
592    event.preventDefault();
593
594}
595
596function sfsi_pinterest_modal(imgs) {
597    // if (jQuery('.sfsi_premium_wechat_follow_overlay').length == 0) {
598    jQuery('body').append(
599        "<div class='sfsi_wechat_follow_overlay sfsi_overlay show'>" +
600        "<div class='sfsi_inner_display'>" +
601        '<a class="close_btn" href="" onclick="event.preventDefault();close_overlay(\'.sfsi_wechat_follow_overlay\')" >×</a>' +
602        "<div style='width:95%;max-width:500px; min-height:80%;background-color:#fff;margin:0 auto;margin:10% auto;padding: 20px 0;border-radius: 20px;'>" +
603        "<h4 style='margin-left:10px;'>Pin It on Pinterest</h4>" +
604        "<div class='sfsi_flex_container'>" +
605
606        "</div>" +
607        "</div>" +
608        "</div>" +
609        "</div>"
610    );
611}
612
613// should execute at last so that every function is acceptable in body.
614var sfsi_functions_loaded = new CustomEvent('sfsi_functions_loaded', {
615    detail: {
616        "abc": "def"
617    }
618});
619window.dispatchEvent(sfsi_functions_loaded);

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.