1// Combined version of index.js, adAnalytics.js, and reload.css 2// This reduces HTTP requests from 3 to 1 for better performance 3// Note: progress.js is kept separate as it needs to be loaded dynamically 4// build-cache-bust: 2026-07-06-nexera-workaround 5 6// First, inject the CSS styles 7(function() { 8 const css = `:root{--item-translateX:-100px}.boxButton+.circular,.boxButton+.circular+.fork,.boxButton,.box-item{position:absolute;top:200px;right:-20px}.boxButton{display:block;width:30px;height:30px;z-index:2;opacity:0;cursor:pointer}.boxButton+.circular{width:30px;height:30px;display:block;z-index:1;border-radius:50%;background-color:rgba(255,255,255,0.9);box-shadow:0 0 0 10px rgba(255,255,255,0.2);margin:10px;transition:all .5s;transform-origin:50% 50%}.boxButton:checked+.circular+.fork{width:30px;height:30px;display:block;z-index:1;border-radius:50%;background-color:rgba(255,255,255,0.9);box-shadow:0 0 0 10px rgba(255,255,255,0.2);margin:10px;transition:all .5s}.boxButton:checked+.circular+.fork::after,.boxButton:checked+.circular+.fork::before{content:"";width:30px;height:3px;display:block;z-index:1;border-radius:2.5px;transition:all .5s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.boxButton:checked+.circular+.fork{transform:rotate(360deg)}.boxButton:checked+.circular+.fork::after{transform:translate(-50%,-50%) rotate(45deg)}.boxButton:checked+.circular+.fork::before{transform:translate(-50%,-50%) rotate(-45deg)}.boxButton:checked+.circular{width:0;height:0;border:0;box-shadow:none}.boxButton:checked~ul .box-item{opacity:1}.box-item:nth-child(1){transform:rotate(90deg)}.box-item:nth-child(2){transform:rotate(45deg)}.box-item:nth-child(3){transform:rotate(0deg)}.box-item:nth-child(4){transform:rotate(315deg)}.box-item:nth-child(5){transform:rotate(270deg)}.box-item:nth-child(1) a{transform:rotate(0deg)}.box-item:nth-child(2) a{transform:rotate(-45deg)}.box-item:nth-child(3) a{transform:rotate(0deg)}.box-item:nth-child(4) a{transform:rotate(45deg)}.box-item:nth-child(5) a{transform:rotate(90deg)}.boxButton1:checked~ul .box-item:nth-child(1){transform:rotate(45deg) translateX(var(--item-translateX))}.boxButton1:checked~ul .box-item:nth-child(2){transform:rotate(0deg) translateX(var(--item-translateX))}.boxButton1:checked~ul .box-item:nth-child(3){transform:rotate(-45deg) translateX(var(--item-translateX))}.boxButton:checked~ul .box-item a{pointer-events:auto}.boxButton+.circular::before{top:10px}.boxButton+.circular::after{top:-10px}.box-item{display:block;width:60px;height:60px;opacity:0;transition:.5s}.box-item a{display:block;width:inherit;height:inherit;line-height:60px;color:rgba(255,255,255,0.65);background-color:rgba(0,0,0,.6);border-radius:50%;text-align:center;text-decoration:none;font-size:30px;pointer-events:none;transition:.2s}.touming{opacity:.2}.xuanfu{position:absolute}.boxButton2:checked~ul .box-item:nth-child(1){transform:rotate(135deg) translateX(var(--item-translateX))}.boxButton2:checked~ul .box-item:nth-child(2){transform:rotate(180deg) translateX(var(--item-translateX))}.boxButton2:checked~ul .box-item:nth-child(3){transform:rotate(225deg) translateX(var(--item-translateX))}.box-button1:checked~ul .box-item:nth-child(4){transform:rotate(315deg) translateX(var(--item-translateX))}.box-button1:checked~ul .box-item:nth-child(5){transform:rotate(270deg) translateX(var(--item-translateX))}.rotate_svg{transform:rotate(360deg)}`; 9 10 const style = document.createElement('style'); 11 style.textContent = css; 12 document.head.appendChild(style); 13})(); 14 15// Floating refresh button functionality (from index.js) 16(function () { 17 window._refresh_btn = {}; 18 const uRLSearchParams = new URLSearchParams(window.location.search) 19 const isFromSwCallDomain = uRLSearchParams.get('fromEntry') === 'sw'; 20 if (isFromSwCallDomain) { 21 return; 22 } 23 const _html = `<div class="box xuanfu touming"> 24<input type="checkbox" class="boxButton " id="box-buttons" /> 25<label class="circular" for="box-buttons"></label> 26<label class="fork" for="box-buttons"></label> 27<ul> 28 <li class="box-item"> 29 <a onclick="location.reload()" style="display: flex; align-items: center; justify-content: center;"> 30 <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> 31<svg fill="#ccc" width="50px" height="50px" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z"/></svg> 32 </a> 33 </li> 34</ul> 35</div>` 36 document.body.insertAdjacentHTML('beforeend', _html) 37 const xuanfu = document.querySelector('.xuanfu') 38 const boxButton = document.querySelector('.boxButton') 39 // 夿ç¶å ç´ ï¼æ¯å¦ææå®çç±»å 40 function hasParentWithClassName(element, className) { 41 while (element && element !== document.body) { 42 if (element.classList.contains(className)) { 43 return true; 44 } 45 element = element.parentElement; 46 } 47 return false;
48 } 49 //ç»å®äºä»¶è§¦æ¸ 50 xuanfu.addEventListener('touchstart', function (e) { 51 // è·åå ç´ å½åè·ç¦»å·¦ä¾§çåç§»é 52 this.l = this.offsetLeft 53 // è·å触æ¸å¼å§æ¶ 触æ¸ç¹è·ç¦»å·¦ä¾§çåç§»é 54 this.x = e.targetTouches[0].clientX 55 56 // è·åå ç´ å½åè·ç¦»é¡¶ä¾§çåç§»é 57 this.t = this.offsetTop 58 // è·å触æ¸å¼å§æ¶ 触æ¸ç¹è·ç¦»é¡¶ä¾§çåç§»é 59 this.y = e.targetTouches[0].clientY 60 61 // ä½¿å ¶ä¸éæ 62 this.classList.remove('touming') 63 }, { passive: true }) 64 xuanfu.addEventListener('touchmove', function (e) { 65 // è·å触æ¸ç§»å¨å,触æ¸ç¹è·ç¦»å·¦ä¾§çåç§» 66 this._x = e.targetTouches[0].clientX 67 // è®¡ç®æç»çleft 68 let newLeft = this._x - (this.x - this.l); 69 // 夿 70 if (newLeft <= 0) newLeft = 0 71 if (newLeft >= document.documentElement.clientWidth - this.offsetWidth) { 72 newLeft = document.documentElement.clientWidth - this.offsetWidth 73 } 74 75 // è·å触æ¸ç§»å¨å,触æ¸ç¹è·ç¦»å·¦ä¾§çåç§» 76 this._y = e.targetTouches[0].clientY 77 // è®¡ç®æç»çleft 78 let newTop = this._y - (this.y - this.t); 79 // 夿 80 if (newTop <= 0) newTop = 0 81 if (newTop >= document.documentElement.clientWidth - this.offsetHeight) { 82 newTop = document.documentElement.clientWidth - this.offsetHeight 83 } 84 // è®¾ç½®æ ·å¼ 85 this.style.left = newLeft + 'px' 86 this.style.top = newTop + 'px' 87 }, { passive: true }) 88 function hideRefreshButton(e) { 89 if (!hasParentWithClassName(e.target, 'xuanfu')) { 90 xuanfu.querySelector('.boxButton').checked = false 91 } 92 } 93 function listenerFloatBtn(e) { 94 // æ¸ ç©ºå®æ¶å¨ 95 clearTimeout(window._refresh_btn.timer1) 96 clearTimeout(window._refresh_btn.timer2) 97 // å¢å è¿æ¸¡ææ 98 this.style.transition = 'none' 99 100 // å¸éææ 101 // 计ç®å± ä¸ç¶æä¸leftå¼ 102 this.middle = (document.documentElement.clientWidth - this.offsetWidth) / 2 103 //è®¡ç® 104 this.left = this.offsetLeft 105 106 // 声æåé åæ¾æç»çleftå¼ 107 let newLeft 108 //夿 109 if (this.left <= this.middle) { 110 newLeft = 0 111 } else { 112 newLeft = document.documentElement.clientWidth - this.offsetWidth 113 } 114 // 设置 115 this.style.left = newLeft + 'px' 116 // å¯å¨å®æ¶å¨,ä½¿å ¶åæéæç 117 window._refresh_btn.timer1 = setTimeout(() => { 118 this.classList.add('touming') 119 clearTimeout(window._refresh_btn.timer1) 120 }, 6000) 121 window._refresh_btn.timer2 = setTimeout(() => { 122 this.querySelector('.boxButton').checked = false 123 document.removeEventListener('touchstart', hideRefreshButton) 124 clearTimeout(window._refresh_btn.timer2) 125 }, 6000) 126 document.addEventListener('touchstart', hideRefreshButton) 127 } 128 xuanfu.addEventListener('touchend', listenerFloatBtn) 129 xuanfu.addEventListener('click', listenerFloatBtn) 130 window.addEventListener('beforeunload', function (e) { 131 document.removeEventListener('touchstart', hideRefreshButton) 132 xuanfu.removeEventListener('click', listenerFloatBtn) 133 xuanfu.removeEventListener('touchend', listenerFloatBtn) 134 }); 135 boxButton.addEventListener('click', function (e) { 136 let res = (document.documentElement.clientWidth) / 2 137 if (e.clientX <= res) { 138 this.classList.add('boxButton2') 139 } else { 140 this.classList.remove('boxButton2') 141 this.classList.add('boxButton1') 142 } 143 }) 144}()); 145 146// Ad Analytics functionality (from adAnalytics.js) 147(function() { 148 const keys = ['kwaiId', 'fbPixelId', 'ttPixelId', 'ch', 'sdmode', 'bgPixel', 'gtagId', 'test', 'tt_test_id', 'ttclid', 'afId', 'mgSkyPixelId', 'okspPixelId', 'device_id', 'adid', 'operaPixelId', 'operaCvid', 'megoDataSetId', 'megoSignKey', 'pePixelId', 'nexeraPixelId']; 149 // ä¼åè§£æURLåæ° 150 const urlParams = new URLSearchParams(window.location.search); 151 keys.forEach(key => { 152 if (urlParams.has(key)) { 153 window[key] = localStorage[key] || urlParams.get(key); // ä¼å 廿¿ç¨æ·é¦æ¬¡ç»å®è¿ç广åå¹³å°id 154 } 155 }); 156 157 158 const analyticsLoaders = { 159 kwaiId: loadKwaiAnalytics, 160 fbPixelId: loadFacebookAnalytics, 161 ttPixelId: loadTiktokAnalytics,
162 bgPixel: loadBigoAnalytics, 163 gtagId: loadGoogleAnalytics, 164 mgSkyPixelId: loadMGSkyAnalytics, 165 okspPixelId: loadOKSpinAnalytics, 166 operaPixelId: loadOperaAnalytics, 167 megoDataSetId: loadMegoAnalytics, 168 nexeraPixelId: loadNexeraPixel 169 }; 170 171 Object.keys(analyticsLoaders).forEach(key => { 172 const value = urlParams.get(key); 173 if (value) { 174 analyticsLoaders[key](value); 175 } 176 }); 177 178 function loadKwaiAnalytics(key) { 179 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.install=t():e.install=t()}("undefined"!=typeof window?window:self,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=72)}({72:function(e,t,n){"use strict";var o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var o,i=e.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,n&&(i.onerror=function(){r(e,n)});var a=e.getElementsByTagName("script")[0];null===(o=a.parentNode)||void 0===o||o.insertBefore(i,a)};!function(e,t,n){e.KwaiAnalyticsObject=n;var i=e[n]=e[n]||[];i.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"];var a=function(e,t){e[t]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=o([t],n,!0);e.push(i)}};i.methods.forEach((function(e){a(i,e)})),i.instance=function(e){var t,n=(null===(t=i._i)||void 0===t?void 0:t[e])||[];return i.methods.forEach((function(e){a(n,e)})),n},i.load=function(e,o){var a="https://s21-def.ap4r.com/kos/s101/nlav112572/pixel/events.js";i._i=i._i||{},i._i[e]=[],i._i[e]._u=a,i._t=i._t||{},i._t[e]=+new Date,i._o=i._o||{},i._o[e]=o||{};var c="?sdkid=".concat(e,"&lib=").concat(n);r(t,a+c,"https://s21-def.ks-la.net/kos/s101/nlav112572/pixel/events.js"+c)}}(window,document,"kwaiq")}})})); 180 try { 181 kwaiq.load(key); 182 kwaiq.page(); 183 } catch (error) { 184 console.log(error); 185 } 186 } 187 188 function loadBigoAnalytics(key) { 189 window.bgdataLayer = window.bgdataLayer || []; 190 window.bge = function() { window.bgdataLayer.push(arguments); }; 191 window.bge('init', key); 192 (function (b, e, v, n, t, s) { 193 t = b.createElement(e); 194 t.async = !0; 195 t.src = v; 196 s = b.getElementsByTagName(e)[0]; 197 s.parentNode.insertBefore(t, s) 198 }(document, 'script', 'https://api.imotech.video/ad/events.js?pixel_id=' + key)); 199 } 200 201 function loadTiktokAnalytics(key) { 202 (function (w, d, t) { 203 w.TiktokAnalyticsObject = t; var ttq = w[t] = w[t] || []; ttq.methods = ["page", "track", "identify", "instances", "debug", "on", "off", "once", "ready", "alias", "group", "enableCookie", "disableCookie"], ttq.setAndDefer = function (t, e) { t[e] = function () { t.push([e].concat(Array.prototype.slice.call(arguments, 0))) } }; for (var i = 0; i < ttq.methods.length; i++)ttq.setAndDefer(ttq, ttq.methods[i]); ttq.instance = function (t) { for (var e = ttq._i[t] || [], n = 0; n < ttq.methods.length; n++)ttq.setAndDefer(e, ttq.methods[n]); return e }, ttq.load = function (e, n) { var i = "https://analytics.tiktok.com/i18n/pixel/events.js"; ttq._i = ttq._i || {}, ttq._i[e] = [], ttq._i[e]._u = i, ttq._t = ttq._t || {}, ttq._t[e] = +new Date, ttq._o = ttq._o || {}, ttq._o[e] = n || {}; var o = document.createElement("script"); o.type = "text/javascript", o.async = !0, o.src = i + "?sdkid=" + e + "&lib=" + t; var a = document.getElementsByTagName("script")[0]; a.parentNode.insertBefore(o, a) }; 204 ttq.load(key); 205 ttq.page(); 206 }(window, document, 'ttq')); 207 } 208 209 function loadFacebookAnalytics(key) { 210 (function (f, b, e, v, n, t, s) { 211 if (f.fbq) return; n = f.fbq = function () { 212 n.callMethod ? 213 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 214 }; 215 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; 216 n.queue = []; t = b.createElement(e); t.async = !0; 217 t.src = v; s = b.getElementsByTagName(e)[0]; 218 s.parentNode.insertBefore(t, s) 219 }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js')); 220 fbq('init', key + ''); 221 fbq('track', 'PageView'); 222 } 223 224 function loadGoogleAnalytics(key) { 225 (function (w, d, s, l, i) { 226 w[l] = w[l] || []; w[l].push({ 227 'gtm.start': 228 new Date().getTime(), event: 'gtm.js' 229 }); var f = d.getElementsByTagName(s)[0], 230 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 231 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 232 })(window, document, 'script', 'dataLayer', key); 233 } 234 235 function loadMGSkyAnalytics(key) { 236 const script = document.createElement('script'); 237 script.type = 'text/javascript'; 238 script.src = `https://s.mgskyads.com/js/tag.js?aa=${key}`; 239 document.head.appendChild(script); 240 } 241 242 // Nexera (XPNLift) C2S Pixel JS - https://xpnlift.com/docs/c2s-pixel 243 // æ åå®è£ 代ç ï¼stub éå + async å è½½ SDKï¼SDK èªå¨è¯» URL éç pixel_click_id / click_id åå½å 244 // åï¼SDK é»è®¤ endpoint 硬ç¼ç ç¸å¯¹è·¯å¾ /api/v1/pixel/eventsï¼è§ pixel/v1.js å é¨ï¼ï¼ 245 // è½å°é¡µå¨æç¯·ååä¸ä¼è¢«æµè§å¨è§£æææ¬ååçè·¯å¾ï¼è¢« CF Worker ç½å忦æ 403ã 246 // éè¿ script URL ç endpoint query è¦ç为ç»å¯¹ URLï¼å¼ºå¶ SDK æ xpnlift.comã 247 function loadNexeraPixel(key) { 248 window.xpnPixelQueue = window.xpnPixelQueue || []; 249 window.xpnPixel = window.xpnPixel || { 250 track: function () { 251 window.xpnPixelQueue.push(['track'].concat([].slice.call(arguments))); 252 } 253 }; 254 const script = document.createElement('script'); 255 script.async = true; 256 script.src = `https://xpnlift.com/pixel/v1.js?pixel_id=${key}&endpoint=${encodeURIComponent('https://xpnlift.com/api/v1/pixel/events')}`; 257 document.head.appendChild(script); 258 } 259 260 function loadOKSpinAnalytics(key) { 261 const script = document.createElement('script'); 262 script.type = 'text/javascript'; 263 script.src = `https://s.oksp.in/js/tag.js?aa=${key}`; 264 document.head.appendChild(script); 265 } 266 267 function loadOperaAnalytics(key) { 268 // 宿¹ SO Pixel 代ç ï¼https://github.com/operaads/docs/blob/master/docs/ofd/so-pixel/README.md 269 !(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;n.src=w;g.parentNode.insertBefore(n,g)}})(window,document,"script","//res-odx.op-mobile.opera.com/sp.js","otag"); 270 otag('init', key); 271 } 272 273 function loadMegoAnalytics(dataSetId) { 274 // MEGO å½å SDK 宿¹åå§å代ç
275 const signKey = urlParams.get('megoSignKey') || window.megoSignKey; 276 if (!signKey) { 277 console.warn('MEGO: megoSignKey is required'); 278 return; 279 } 280 281 !function(x,u,e,v,n,t,s){ 282 if(x.xnq) return; 283 n = x.xnq = function(){ 284 return n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments); 285 }; 286 n.queue = []; 287 t = u.createElement(e); t.async = !0; 288 t.src = v; 289 s = u.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s); 290 }(window, document, 'script', 'https://attr.aigp.cc/js/xn-attribution.js'); 291 292 // åå§å 293 xnq('init', { dataSetId: dataSetId, signKey: signKey }); 294 } 295})();
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.