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 245 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(), 246 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"), 247 SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()), 248 SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({ 249 "z-index": "999" 250 }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 251 opacity: 1, 252 "z-index": 10 253 }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"), 254 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 255 opacity: 1, 256 "z-index": 10 257 }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"), 258 SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 259 opacity: 1, 260 "z-index": 10 261 }
261)), ("top-left" == i || "top-right" == i || "center-top" == 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"), 262 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"), 263 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 264 opacity: 1, 265 "z-index": 10, 266 "bottom": "auto" 267 }), 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"), 268 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"), 269 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 270 opacity: 1, 271 "z-index": 1e3 272 }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()); 273 }) 274 : SFSI(document).on("mouseenter", "img.sfsi_wicon", function () { 275 /*console.log('img mouseenter');*/ 276 var s = SFSI("#sfsi_floater_sec").val(); 277 //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(); 278 SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 279 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"), 280 SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()); 281 // SFSI(this).parent().parent().parent().css("z-index", "1000000"); 282 // SFSI(this).parent().parent().css({ "z-index": "999" }); 283 SFSI(this).parent().css({ "opacity": "1" }); 284 SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 285 opacity: 1, 286 "z-index": 1e8 287 }), SFSI(this).parent().css("opacity", "1")); 288 SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"), 289 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 290 opacity: 1, 291 "z-index": 1e8 292 }), SFSI(this).parent().css("opacity", "1")); 293 SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"), 294 SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 295 opacity: 1, 296 "z-index": 1e8 297 })); 298 ("top-left" == s || "top-right" == s || "center-top" == s) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 299 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") 300 ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"), 301 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"), 302 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 303 opacity: 1, 304 "z-index": 1e8, 305 "bottom": "auto" 306 }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) 307 : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"), 308 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"), 309 SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({ 310 opacity: 1, 311 "z-index": 1e8 312 }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()); 313 }); 314 SFSI(document).on("mouseleave", "div.sfsi_wicons", function () { 315 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"), 316 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"), 317 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"), 318 SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("display", "none"), 319 SFSI(this).parent("div").find("div.sfsi_tool_tip_2").css("opacity", "0"); 320 });
321 322 SFSI(document).on("mouseenter", "div.sfsi_tool_tip_2", function () { 323 SFSI(this).find("div.sfsi_tool_tip_2").css({ "z-index": 1e8, "opacity": 1 }); 324 }); 325 SFSI("body").on("click", function (e) { 326 var target = SFSI(e.target); 327 if (!target.is(".sfsi_wicon")) { 328 SFSI(".inerCnt").find("div.sfsi_tool_tip_2").hide(); 329 } 330 331 }); 332 SFSI(".adminTooltip >a").on("hover", function () { 333 SFSI(this).offset().top, SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "1"), 334 SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").show(); 335 }); 336 SFSI(".adminTooltip").on("mouseleave", function () { 337 "none" != SFSI(".gpls_tool_bdr").css("display") && 0 != SFSI(".gpls_tool_bdr").css("opacity") ? SFSI(".pop_up_box ").on("click", function () { 338 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(); 339 }) : (SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"), 340 SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide()); 341 }); 342 SFSI(".expand-area").on("click", function () { 343 "Read more" == SFSI(this).text() ? (SFSI(this).siblings("p").children("label").fadeIn("slow"), 344 SFSI(this).text("Collapse")) : (SFSI(this).siblings("p").children("label").fadeOut("slow"), 345 SFSI(this).text("Read more")); 346 }); 347 SFSI(".sfsi_wDiv").length > 0 && setTimeout(function () { 348 var s = parseInt(SFSI(".sfsi_wDiv").height()) + 15 + "px"; 349 SFSI(".sfsi_holders").each(function () { 350 SFSI(this).css("height", s); 351 SFSI(".sfsi_widget"); 352 }); 353 }, 200); 354 355 /* Admin forum notification */ 356 SFSI('.usm-widget__footer-text-link').on('click', function () { 357 SFSI(this).parents('.usm-widget').toggle('usm-widget--open'); 358 359 SFSI.ajax({ 360 type: "post", 361 dataType: "json", 362 url: sfsi_icon_ajax_object.ajax_url, 363 data: { 364 nonce: sfsi_icon_ajax_object.nonce, 365 action: "sfsi_hide_admin_forum_notification" 366 }, 367 success: function () { 368 SFSI('.usm-widget').remove(); 369 } 370 }); 371 }); 372 373 /* Hide Admin forum notification popup */ 374 SFSI('.usm-widget__toggle-btn').on('click', function () { 375 var currentThis = SFSI(this); 376 currentThis.parents('.usm-widget').toggleClass('usm-widget--open'); 377 var toggleStatus = ''; 378 if (currentThis.parents('.usm-widget').hasClass('usm-widget--open')) { 379 toggleStatus = 'hide'; 380 } else { 381 toggleStatus = 'show'; 382 } 383 SFSI.ajax({ 384 type: "post", 385 dataType: "json", 386 url: sfsi_icon_ajax_object.ajax_url, 387 data: { action: "sfsi_default_hide_admin_notification", status: toggleStatus, nonce: sfsi_icon_ajax_object.unonce }, 388 success: function () { 389 currentThis.addClass('sfsi-first-click-enabled'); 390 } 391 }); 392 }); 393}); 394 395//hiding popup on close button 396function sfsihidemepopup() { 397 SFSI(".sfsi_FrntInner_chg").fadeOut(); 398} 399var initTop = new Array(); 400 401function close_overlay(selector) { 402 if (typeof selector === "undefined") { 403 selector = '.sfsi_overlay'; 404 } 405 jQuery(selector).removeClass('show').addClass('hide').hide(); 406} 407 408function sfsi_wechat_share(url) { 409 if (jQuery('.sfsi_wechat_follow_overlay').length == 0) { 410 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%;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>"); 411 new QRCode(jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display')[0], encodeURI(decodeURI(window.location.href))) 412 jQuery('.sfsi_wechat_follow_overlay .sfsi_wechat_qr_display img').attr('nopin', 'nopin') 413 } else { 414 jQuery('.sfsi_wechat_follow_overlay').removeClass('hide').addClass('show').show(); 415 } 416} 417 418function sfsi_mobile_wechat_share(url) { 419 if (jQuery('.sfsi_wechat_follow_overlay').length == 0) { 420 jQuery('body').append("<div class='sfsi_wechat_follow_overlay sfsi_overlay show'>
420<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>"); 421 } else { 422 jQuery('.sfsi_wechat_scan').removeClass('hide').addClass('show'); 423 } 424} 425 426function sfsi_copy_text_parent_input(event) { 427 var target = jQuery(event.target); 428 /*console.log(target);*/ 429 input_target = target.parent().parent().parent().find('input'); 430 input_target.select(); 431 document.execCommand('copy'); 432} 433 434function sfsi_responsive_toggle() { 435 let lastScrollTop = 0; // Track the last scroll position 436 437 jQuery(window).on('scroll', function () { 438 let scrollTop = jQuery(this).scrollTop(); 439 let scrollDirection = scrollTop > lastScrollTop ? 'down' : 'up'; // Determine scroll direction 440 lastScrollTop = scrollTop; 441 442 // Only execute if popup is not closed 443 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 444 if (scrollDirection === 'down' && jQuery(window).scrollTop() + jQuery(window).height() >= jQuery(document).height() - 100) { 445 showPopup(); 446 } 447 } else { 448 if (scrollDirection === 'down' && jQuery(window).scrollTop() + jQuery(window).height() >= jQuery(document).height() - 3) { 449 showPopup(); 450 } 451 } 452 }); 453 454 // Function to show the popup 455 function showPopup() { 456 jQuery('.sfsi_outr_div').css({ 457 'z-index': '9996', 458 opacity: 1, 459 top: 'calc((100vh - ' + jQuery('.sfsi_outr_div').outerHeight() + 'px) / 2)', 460 position: 'fixed', 461 }); 462 jQuery('.sfsi_outr_div').fadeIn(200); 463 jQuery('.sfsi_FrntInner_chg').fadeIn(200); 464 } 465} 466 467function createCookie(name, value, expires, path, domain) { 468 var cookie = name + "=" + escape(value) + ";"; 469 470 if (expires) { 471 // If it's a date 472 if (expires instanceof Date) { 473 // If it isn't a valid date 474 if (isNaN(expires.getTime())) 475 expires = new Date(); 476 } 477 else 478 expires = new Date(new Date().getTime() + parseInt(expires) * 1000 * 60 * 60 * 24); 479 480 cookie += "expires=" + expires.toGMTString() + ";"; 481 } 482 483 if (path) 484 cookie += "path=" + path + ";"; 485 if (domain) 486 cookie += "domain=" + domain + ";"; 487 488 document.cookie = cookie; 489} 490 491function sfsi_time_pop_up(time_popUp) { 492 jQuery(document).ready(function ($) { 493 try { 494 // Check if cookie exists 495 if (document.cookie.indexOf('sfsi_popup') !== -1) { 496 return; 497 } 498 499 // If it doesn't exist, create it 500 createCookie('sfsi_popup', new Date.getTime(), 30, '/'); 501 } catch (Exception) { 502 // Do nothing 503 } 504 505 setTimeout(function () { 506 jQuery('.sfsi_outr_div').css({ 507 'z-index': '1000000', 508 opacity: 1 509 }); 510 jQuery('.sfsi_outr_div').fadeIn(200); 511 jQuery('.sfsi_FrntInner_chg').fadeIn(200); 512 }, time_popUp); 513 }); 514} 515 516function sfsi_social_pop_up(time_popUp) { 517 jQuery(document).ready(function ($) { 518 //jQuery('.sfsi_outr_div').fadeIn(); 519 try { 520 // Check if cookie exists 521 if (document.cookie.indexOf('sfsi_socialPopUp') !== -1) { 522 return; 523 } 524 525 // If it doesn't sfsi_socialPopUp, create it 526 createCookie('sfsi_popup', new Date.getTime(), 30, '/'); 527 } catch (Exception) {
528 // Do nothing 529 } 530 531 setTimeout(function () { 532 jQuery('.sfsi_outr_div').css({ 533 'z-index': '1000000', 534 opacity: 1 535 }); 536 jQuery('.sfsi_outr_div').fadeIn(); 537 }, time_popUp); 538 }); 539} 540 541function sfsi_plugin_version(pluginVersion) { 542 jQuery(document).ready(function (e) { 543 jQuery("body").addClass("sfsi_" + pluginVersion) 544 }); 545} 546 547function sfsi_widget_set() { 548 jQuery(".sfsi_widget").each(function (index) { 549 if (jQuery(this).attr("data-position") == "widget") { 550 var wdgt_hght = jQuery(this).children(".norm_row.sfsi_wDiv").height(); 551 var title_hght = jQuery(this).parent(".widget.sfsi").children(".widget-title").height(); 552 var totl_hght = parseInt(title_hght) + parseInt(wdgt_hght); 553 jQuery(this).parent(".widget.sfsi").css("min-height", totl_hght + "px"); 554 /*console.log('widget');*/ 555 } 556 }); 557} 558 559SFSI(window).on('load', function () { 560 SFSI('.sfsi_pinterest_sm_click').on('click touchstart', function () { 561 sfsi_pinterest_modal_images(e); 562 }); 563}); 564 565function sfsi_pinterest_modal_images(event, url, title) { 566 /*console.log(event);*/ 567 event && event.preventDefault(); 568 var imgSrc = []; 569 var page_title; 570 571 page_title = SFSI('meta[property="og:title"]').attr('content'); 572 if (undefined == page_title) { 573 page_title = SFSI('head title').text(); 574 } 575 if (undefined == title) { 576 title = page_title; 577 } 578 if (undefined == url) { 579 url = window.location.href; 580 // url = encodeURIComponent(window.location.href); 581 } 582 SFSI('body img').each(function (index) { 583 var src = SFSI(this).attr('src') || ""; 584 var height = SFSI(this).height(); 585 var width = SFSI(this).width(); 586 var image_title = SFSI(this).attr('title') || ""; 587 var alt = SFSI(this).attr('alt') || ""; 588 var no_pin = SFSI(this).attr('data-pin-nopin') || ""; 589 var no_pin_old = SFSI(this).attr('nopin') || ""; 590 591 if (src !== "" && !src.startsWith("javascript") && height > 100 && width > 100 && no_pin_old !== "nopin" && no_pin !== "true") { 592 imgSrc.push({ 593 src: src, 594 title: title && "" !== title ? title : (image_title && "" !== image_title ? image_title : alt) 595 }); 596 } 597 }); 598 599 sfsi_pinterest_modal(); 600 if (imgSrc.length == 0) { 601 var meta_img = SFSI('meta[property="og:image"]').attr('content'); 602 if (undefined == meta_img) { 603 meta_img = ""; 604 } 605 SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(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>') 606 } else { 607 608 SFSI.each(imgSrc, function (index, val) { 609 SFSI('.sfsi_flex_container').append('<div><a href="http://www.pinterest.com/pin/create/button/?url=' + encodeURIComponent(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>'); 610 }); 611 } 612 event.preventDefault(); 613 614} 615 616function sfsi_pinterest_modal(imgs) { 617 // if (jQuery('.sfsi_premium_wechat_follow_overlay').length == 0) { 618 jQuery('body').append( 619 "<div class='sfsi_wechat_follow_overlay sfsi_overlay show'>" +
620 "<div class='sfsi_inner_display'>" + 621 '<a class="close_btn" href="" onclick="event.preventDefault();close_overlay(\'.sfsi_wechat_follow_overlay\')" >Ã</a>' + 622 "<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;'>" + 623 "<h4 style='margin-left:10px;'>Pin It on Pinterest</h4>" + 624 "<div class='sfsi_flex_container'>" + 625 626 "</div>" + 627 "</div>" + 628 "</div>" + 629 "</div>" 630 ); 631} 632 633// should execute at last so that every function is acceptable in body. 634var sfsi_functions_loaded = new CustomEvent('sfsi_functions_loaded', { 635 detail: { 636 "abc": "def" 637 } 638}); 639window.dispatchEvent(sfsi_functions_loaded); 640 641function showSuccessAlert() { 642 var alert = document.getElementById("success-alert"); 643 alert.style.display = "block"; 644 alert.style.animation = "intro-animation 1s"; 645 646 setTimeout(function() { 647 alert.style.animation = "fade-out 2s"; 648 setTimeout(function() { 649 alert.style.display = "none"; 650 alert.style.animation = "none"; // Reset the animation 651 }, 2000); // Adjust the timing to match the fade-out animation duration 652 }, 3000); // Show the alert for 3 seconds (you can adjust the timing) 653} 654 655/* Copy link */ 656function sfsi_copyLink(str) { 657 658 try { 659 660 const el = document.createElement('textarea'); 661 el.value = str; 662 el.setAttribute('readonly', ''); 663 el.style.position = 'absolute'; 664 el.style.left = '-9999px'; 665 document.body.appendChild(el); 666 el.select(); 667 document.execCommand('copy'); 668 document.body.removeChild(el); 669 670 // Confirmation of copy success e.g. alert or notification 671 showSuccessAlert(); 672 673 return true; 674 675 } catch (e) { 676 console.log(e); 677 678 // Rejection notice of copy failure e.g. alert or notification 679 680 return false; 681 682 } 683 684} 685 686document.querySelectorAll('a.sfsi_copylink').forEach(function (anchor) { 687 anchor.addEventListener('click', function (e) { 688 e.preventDefault(); 689 sfsi_copyLink(window.location.href); 690 }); 691});
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.