1(function() { 2 var docCookies = { 3 getItem: function(sKey) { 4 return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; 5 }, 6 setItem: function(sKey, sValue, vEnd, sPath, sDomain, bSecure) { 7 if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; } 8 var sExpires = ""; 9 if (vEnd) { 10 switch (vEnd.constructor) { 11 case Number: 12 sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd; 13 break; 14 case String: 15 sExpires = "; expires=" + vEnd; 16 break; 17 case Date: 18 sExpires = "; expires=" + vEnd.toUTCString(); 19 break; 20 } 21 } 22 document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : ""); 23 return true; 24 }, 25 removeItem: function(sKey, sPath, sDomain) { 26 if (!sKey || !this.hasItem(sKey)) { return false; } 27 document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : ""); 28 return true; 29 }, 30 hasItem: function(sKey) { 31 return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); 32 }, 33 keys: /* optional method: you can safely remove it! */ function() { 34 var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/); 35 for (var nIdx = 0; nIdx < aKeys.length; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); } 36 return aKeys; 37 } 38 }; 39 40 function readCookie(name) { 41 var nameEQ = name + "="; 42 var ca = document.cookie.split(';'); 43 for (var i = 0; i < ca.length; i++) { 44 var c = ca[i]; 45 while (c.charAt(0) == ' ') c = c.substring(1, c.length); 46 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); 47 } 48 return null; 49 } 50 51 function setCookie(c_name, value, exdays) { 52 var exdate = new Date(); 53 exdate.setDate(exdate.getDate() + exdays); 54 var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString()); 55 document.cookie = c_name + "=" + c_value; 56 } 57 var Message = { 58 time: 0, 59 title: document.title, 60 timer: null, 61 // æ¾ç¤ºæ°æ¶æ¯æç¤º 62 show: function() { 63 var title = Message.title.replace("ããããã", "").replace("ãæ°æ¶æ¯ã", ""); 64 // 宿¶å¨ï¼è®¾ç½®æ¶æ¯åæ¢é¢çéªçææå°±æ¤äº§ç 65 Message.timer = setTimeout(function() { 66 Message.time++; 67 Message.show(); 68 if (Message.time % 2 == 0) { 69 document.title = "ãæ°æ¶æ¯ã" + title 70 } else { 71 document.title = "ããããã" + title 72 }; 73 }, 600); 74 return [Message.timer, Message.title]; 75 }, 76 // åæ¶æ°æ¶æ¯æç¤º 77 clear: function() { 78 clearTimeout(Message.timer); 79 document.title = Message.title; 80 } 81 }; 82 var html = [ 83 '<div class="side-tool">', 84 ' <div class="side-tool-top">', 85 ' <div class="side-tool-item-vip joinf-chat">', 86 ' <div class="w-icon" > ', 87 ' <img src="https://asset.joinf.com/official/images/vip.png" />', 88 ' </div>', 89 ' <div class="w-tip">', 90 ' å¨çº¿å¨è¯¢', 91 ' </div>', 92 ' </div>', 93 ' <div class="side-tool-item-line"></div>', 94 ' <div class="side-tool-item weixinzixun">', 95 ' <div class="w-icon w-icon-hover" > ', 96 ' <img src="https://asset.joinf.com/official/images/weixin.svg" />', 97 ' </div>', 98 ' <div class="w-tip">', 99 ' 微信å¨è¯¢', 100 ' </div>', 101 ' <div class="weixin-detail">', 102 ' <img src="https://asset.joinf.com/official/images/index/Group4.png?t=2026" width="110" height="110" />', 103 ' <div>微信æ«ç ç«å³å¨è¯¢</div>', 104 ' </div>', 105 ' </div>', 106 ' <div class="side-tool-item-line"></div>', 107 ' <div class="side-tool-item feedback">', 108 ' <div class="w-icon w-icon-hover" > ', 109 ' <img src="https://asset.joinf.com/official/images/message.svg" />', 110 ' </div>', 111 ' <div class="w-tip">', 112 ' å è´¹ä½éª', 113 ' </div>', 114 ' </div>', 115 ' <div class="side-tool-item-line"></div>', 116 ' <div class="side-tool-item">', 117 ' <div class="w-icon w-icon-hover" > ', 118 ' <img src="https://asset.joinf.com/official/images/phone.svg" />', 119 ' </div>', 120 ' <div class="w-tip">', 121 ' èç³»çµè¯', 122 ' </div>', 123 ' <div class="w-detail">', 124 ' 400-881-6668', 125 ' </div>', 126 ' </div>', 127 ' </div>', 128 ' <div class="side-tool-bottom hide">', 129 ' <div class="side-tool-item" id="gotop">', 130 ' <div class="w-icon" > ', 131 ' <svg t="1574840093363" class="icon" viewB
131ox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1307" width="24" height="24"><path d="M531.135405 304.426901c-4.911762-4.911762-11.665434-7.981613-19.135405-7.981613-7.469971 0-14.223643 3.069851-19.135405 7.981613L227.117818 570.173678c-10.539822 10.539822-10.539822 27.526332 0 38.066154 5.218747 5.218747 12.177076 7.879285 19.033076 7.879285 6.856001 0 13.81433-2.660538 19.033077-7.879285L485.087639 388.336165v423.434795c0 14.837614 12.074748 26.912361 26.912361 26.912362s26.912361-12.074748 26.912361-26.912362V388.336165l219.801339 219.801339c10.539822 10.539822 27.526332 10.539822 38.066154 0 10.539822-10.539822 10.539822-27.526332 0-38.066154L531.135405 304.426901zM841.497352 185.21435h-658.994704c-14.837614 0-26.912361 12.074748-26.912361 26.912361s12.074748 26.912361 26.912361 26.912362h658.994704c14.837614 0 26.912361-12.074748 26.912361-26.912362S856.334966 185.21435 841.497352 185.21435z" p-id="1308"></path></svg>', 132 ' </div>', 133 ' <div class="w-tip" >', 134 ' 置顶', 135 ' </div>', 136 ' </div>', 137 ' </div>', 138 '</div>' 139 ].join('') 140 141 var SideTool = { 142 template: html, 143 init: function init() { 144 $('body').append(this.template); 145 this.bindEvent(); 146 }, 147 bindEvent: function bindEvent() { 148 $(document).on('click', '.joinf-chat', function(e) { 149 var isChat = $(this).data('type') === 'chat' 150 JoinfChat.open(isChat) 151 }) 152 $(document).on('click', '#gotop', function(e) { 153 e.preventDefault(); //以1ç§çé´éè¿åé¡¶é¨ 154 $('body,html').animate({ 155 scrollTop: 0 156 }, 1000); 157 }) 158 $(document).on('click', '.feedbackLink', function(e) { 159 e.preventDefault(); //以1ç§çé´éè¿åé¡¶é¨ 160 var href = $(this).attr('href') 161 window.open(href, '_blank') 162 }) 163 $(document).on('click', '.feedback', function (e) { 164 window.Dialog.open('å¡«åèµæ ç³è¯·ä½éª', 12, 30) 165 // window.Dialog.openSimplify('å¡«åèµæ ç³è¯·ä½éª',12,30) 166 }) 167 } 168 }; 169 170 var timer = null 171 var JoinfChat = { 172 currentType: 'other', 173 template: "\n <div class=\"joinf-support-chat\">\n <div class=\"joinf-support-box\">\n <iframe id=\"joinf-support-iframe\" src=\"\">\n </iframe>\n </div>\n </div>\n ", 174 isMinimize: false, 175 init: function init() { 176 $('body').append(this.template); 177 this.messageListen() 178 }, 179 getTempateSec: function (isChat) { 180 var from = document.referrer 181 var hostname = window.location.hostname 182 var to = window.location.href 183 var url 184 // if (isChat) { 185 // url = 'https://kf.joinf.com/chat?url=data.joinf.com&from=' + encodeURIComponent(from) + '&to=' + encodeURIComponent(to) + '&mid=2&v=0603' 186 // } else { 187 // url = 'https://kf.joinf.com/chat?url=' + encodeURIComponent(hostname) + '&from=' + encodeURIComponent(from) + '&to=' + encodeURIComponent(to) + '&mid=2&v=0603' 188 // } 189 if (isChat) { 190 url = 'https://kf.joinf.com/chat-custom-2/index.html?name=&id=&companyId=0&url=data.joinf.com&mid=2&v=0603' 191 } else { 192 url = 'https://kf.joinf.com/chat-custom-2/index.html?name=&id=&companyId=0&url=' + encodeURIComponent(hostname) + '&mid=2&v=0603' 193 } 194 // https: //kf.joinf.com/chat-custom-2/index.html?name=&id=&companyId=0&url=https%3A%2F%2Fwww.joinf.com%2F&mid=2&v=0603 195 return url 196 }, 197 open: function(isChat) { 198 if (timer) { 199 clearTimeout(timer) 200 timer = null 201 } 202 if ($('#joinf-support-iframe').hasClass('joinf-support-iframe-open')) return 203 var token = new Date().getTime() 204 var currentType = isChat ? 'chat' : 'other' 205 if (!this.isMinimize || JoinfChat.currentType !== currentType) { 206 JoinfChat.currentType = currentType 207 $('#joinf-support-iframe').attr('src', this.getTempateSec(isChat)) 208 } 209 // this.$tip.hide() 210 // Message.clear() 211 $('#joinf-support-iframe').show(); 212 $('#joinf-support-iframe').addClass('joinf-support-iframe-open') 213 }, 214 messageListen: function() { 215 var _this = this 216 window.addEventListener("message", function(event) { 217 if (timer) { 218 clearTimeout(timer) 219 timer = null 220 } 221 if (event.data === 'mibew-chat-closed:') { 222 _this.isMinimize = false 223 $('#joinf-support-iframe').removeClass('joinf-support-iframe-open').hide(); 224 $('#joinf-support-iframe').attr('src', _this.getTempateSec()) 225 if (readCookie('USER_IP') != '1') { 226 timer = setTimeout(function() { 227 JoinfChat.open() 228 }, 15 * 1000) 229 } 230 } 231 if (event.data === 'mibew-chat-closed-end:') { 232 _this.isMinimize = false 233 $('#joinf-support-iframe').removeClass('joinf-support-iframe-open').hide(); 234 $('#joinf-support-iframe').attr('src', _this.getTempateSec()) 235 } 236 if (event.data === 'mibew-chat-minimize:') { 237 _this.isMinimize = true 238 $('#joinf-support-iframe').removeClass('joinf-support-iframe-open').hide(); 239 if (readCookie('USER_IP') != '1') { 240 timer = setTimeout(function() { 241 JoinfChat.open() 242 }, 15 * 1000) 243 } 244 } 245 if (event.data === 'mibew-chat-open:') { 246 window.open(_this.getTempateSec(), 'width=400,height=600') 247 } 248 }, false); 249 } 250 } 251 var ChatSetting = { 252 init: function () {
253 this.getSetting() 254 }, 255 getSetting: function() { 256 var _this = this 257 $.ajax({ 258 url: 'https://kf.joinf.com/joinfapi/getSetting', 259 type: 'GET', 260 dataType: 'json', 261 success: function(res) { 262 if (res.success) { 263 var r = document.referrer 264 r = r.toLowerCase(); 265 var aSites = ['google.', 'baidu.', 'soso.', 'so.', '360.', 'yahoo.', 'youdao.', 'sogou.', 'gougou.'] 266 var flag = false; 267 for (i in aSites) { 268 if (r.indexOf(aSites[i]) > 0) { 269 flag = true; 270 break; 271 } 272 } 273 var time = parseInt(res.data.staytime) 274 if (flag && res.data.entertypekey === 'scustomer') { 275 _this.oepnChat(time) 276 } 277 if (!flag && res.data.entertypekey === 'dvisitor') { 278 _this.oepnChat(time) 279 } 280 if (res.data.entertypekey === 'all') { 281 _this.oepnChat(time) 282 } 283 } 284 } 285 }); 286 }, 287 oepnChat: function(time) { 288 if (time > 0) { 289 docCookies.setItem('USER_IP', '1') 290 timer = setTimeout(function() { 291 JoinfChat.open() 292 }, time * 1000) 293 } else { 294 docCookies.setItem('USER_IP', '0') 295 } 296 } 297 } 298 $(function() { 299 SideTool.init() 300 JoinfChat.init() 301 ChatSetting.init() 302 }) 303})() 304 305 306 307$().ready(function () { 308 $(".side-tool .w-icon-hover").mouseover(function () { 309 var oldSrc = $(this).children('img').attr('src')
310 $(this).children('img').attr('src', oldSrc.replace('.svg', '-active.svg')) 311 }).mouseout(function () { 312 var oldSrc = $(this).children('img').attr('src') 313 $(this).children('img').attr('src', oldSrc.replace('-active.svg','.svg')) 314 }) 315 316 $(window).scroll(function(){ 317 var b = $(this).scrollTop(); // æ»å¨é«åº¦ 318 var h = window.innerHeight || 500 319 if (b > h) { 320 if ($('.side-tool-bottom').hasClass('hide')) { 321 $('.side-tool-bottom').addClass('show') 322 $('.side-tool-bottom').removeClass('hide') 323 } 324 } else { 325 if ($('.side-tool-bottom').hasClass('show')) { 326 $('.side-tool-bottom').addClass('hide') 327 $('.side-tool-bottom').removeClass('show') 328 } 329 } 330 }) 331})
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.