1/********************** 2 3Author: WHMCSdes 4Template: Phox - WMHCS & HTML Web Hosting Theme 5Version: 1.0 6Author URI: whmcsdes.com 7 8***************************/ 9 10/*global jQuery, var, $ */ 11 12(function ($) { 13 "use strict"; 14 15 // Layout width 16 $(".wide-layout").on("click", function () { 17 $(".layout-width").css({ 18 width: "100%", 19 margin: "0", 20 }); 21 }); 22 23 $(".boxed-layout").on("click", function () { 24 $(".layout-width").css({ 25 width: "1200px", 26 margin: "50px auto", 27 }); 28 }); 29 30 // Tooltip operator 31 if (typeof window.bootstrap === "object") { 32 $('[data-toggle="tooltip"]').tooltip(); 33 } 34 35 var wHeight = window.innerHeight; 36 //search bar middle alignment 37 $("#wdes-fullscreen-searchform").css("top", wHeight / 2); 38 //reform search bar 39 jQuery(window).resize(function () { 40 $("#wdes-fullscreen-searchform").css("top", wHeight / 2); 41 }); 42 // Search 43 $("#search-button").on("click", function () { 44 $("div.wdes-fullscreen-search-overlay").addClass( 45 "wdes-fullscreen-search-overlay-show" 46 ); 47 }); 48 $("a.wdes-fullscreen-close").on("click", function () { 49 $("div.wdes-fullscreen-search-overlay").removeClass( 50 "wdes-fullscreen-search-overlay-show" 51 ); 52 }); 53 54 // Loading Screen 55 const loadingClass = $(".wdes-loading"), 56 removeFLow = $("body").css("overflow", "auto"); 57 58 if (loadingClass.length === 1) { 59 $(window).on("load", function () { 60 loadingClass.fadeOut(); 61 removeFLow; 62 }); 63 } 64 65 /* --------------------------------------------------------------------------- 66 * Chat Platforms 67 * --------------------------------------------------------------------------- */ 68 69 //InterCom code snippet 70 function intercomSnippet(intercomUser) { 71 var w = window; 72 var ic = w.Intercom; 73 w.intercomSettings = intercomUser; 74 75 if (typeof ic === "function") { 76 ic("reattach_activator"); 77 ic("update", w.intercomSettings); 78 } else { 79 var d = document; 80 var i = function () { 81 i.c(arguments); 82 }; 83 i.q = []; 84 i.c = function (args) { 85 i.q.push(args); 86 }; 87 w.Intercom = i; 88 var l = function () { 89 var s = d.createElement("script"); 90 s.type = "text/javascript"; 91 s.async = true; 92 s.src = 93 "https://widget.intercom.io/widget/" + w.intercomSettings.app_id; 94 var x = d.getElementsByTagName("script")[0]; 95 x.parentNode.insertBefore(s, x); 96 }; 97 if (w.attachEvent) { 98 w.attachEvent("onload", l); 99 } else { 100 w.addEventListener("load", l, false); 101 } 102 } 103 } 104 105 //Tawk code snippet 106 function tawkSnippet(tawkUser) { 107 var restSrc = ""; 108 if (tawkUser.chatLink.search("https://tawk.to/chat/") === 0) { 109 restSrc = tawkUser.chatLink.split("https://tawk.to/chat/")[1]; 110 } else if (tawkUser.chatLink.search("/") > 0) { 111 restSrc = tawkUser.chatLink; 112 } else { 113 restSrc = tawkUser.chatLink + "/default"; 114 } 115 116 var s1 = document.createElement("script"), 117 s0 = document.getElementsByTagName("script")[0]; 118 s1.async = true; 119 s1.src = "https://embed.tawk.to/" + restSrc; 120 s1.charset = "UTF-8"; 121 s1.setAttribute("crossorigin", "*"); 122 s0.parentNode.insertBefore(s1, s0); 123 } 124 125 //Fire the interCom 126 if (typeof intercomUser !== "undefined" && intercomUser.length != 0) { 127 intercomSnippet(intercomUser); 128 } 129 130 //Fire the Twak 131 if (typeof tawkUser !== "undefined" && tawkUser.length != 0) { 132 var Tawk_API = Tawk_API || {}, 133 Tawk_LoadStart = new Date(); 134 tawkSnippet(tawkUser); 135 } 136 137 // BackToTop Button 138 if ($("#wdes-back-to-top").length > 0) { 139 const backToTopBtn = $("#wdes-back-to-top"); 140 $(window).scroll(function () { 141 if ($(window).scrollTop() > 300) { 142 backToTopBtn.addClass("show"); 143 } else { 144 backToTopBtn.removeClass("show"); 145 } 146 }); 147 backToTopBtn.on("click", function (e) { 148 e.preventDefault(); 149 $("html, body").animate({ scrollTop: 0 }, "300"); 150 }); 151 } 152})(jQuery);
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.