PageSourceSearch

https://0697.ai/assets/combined-r2-Bx0nAwnK.js

js 0697.ai collected 2026-10-05 11:46:51 UTC 18,016 bytes, 295 lines download raw bytes

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.