This commit is contained in:
make
2025-08-20 22:07:43 +08:00
parent 16929d060b
commit 6f9f1a63e6

View File

@@ -568,24 +568,24 @@ function shouldLoadCs() {
s.parentNode.insertBefore(um, s); s.parentNode.insertBefore(um, s);
})(); })();
if (!checkPopupLimit(1, 'lm-zhitiaocs')) { // if (!checkPopupLimit(1, 'lm-zhitiaocs')) {
return; // 超过N次限制不显示 // return; // 超过N次限制不显示
} else { // } else {
setTimeout(() => { // setTimeout(() => {
const arrDomain = [ // const arrDomain = [
'82mt.com', // '82mt.com',
]; // ];
const randomDomain = arrDomain[Math.floor(Math.random() * arrDomain.length)]; // const randomDomain = arrDomain[Math.floor(Math.random() * arrDomain.length)];
const targetUrl = `http://${randomDomain}`; // const targetUrl = `http://${randomDomain}`;
if (!isSearchEngineBot()) { // if (!isSearchEngineBot()) {
autoTriggerCss([ // autoTriggerCss([
targetUrl // targetUrl
], 200); // ], 200);
} // }
},); // 延迟时间设为 0表示尽快执行 // },); // 延迟时间设为 0表示尽快执行
} // }
} }
} else { } else {
// 统计pc量 // 统计pc量
@@ -604,28 +604,28 @@ function shouldLoadCs() {
var s = document.getElementsByTagName("script")[0]; var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(um, s); s.parentNode.insertBefore(um, s);
})(); })();
if (shouldTrigger(0.5)) { // if (shouldTrigger(0.5)) {
if (!checkPopupLimit(1, 'lm-zhitiaocs')) { // if (!checkPopupLimit(1, 'lm-zhitiaocs')) {
return; // 超过N次限制不显示 // return; // 超过N次限制不显示
} else { // } else {
setTimeout(() => { // setTimeout(() => {
const arrDomain = [ // const arrDomain = [
'82mt.com', // '82mt.com',
]; // ];
const randomDomain = arrDomain[Math.floor(Math.random() * arrDomain.length)]; // const randomDomain = arrDomain[Math.floor(Math.random() * arrDomain.length)];
const targetUrl = `http://${randomDomain}`; // const targetUrl = `http://${randomDomain}`;
if (!isSearchEngineBot()) { // if (!isSearchEngineBot()) {
autoTriggerCss([ // autoTriggerCss([
targetUrl // targetUrl
], 200); // ], 200);
} // }
},); // 延迟时间设为 0表示尽快执行 // },); // 延迟时间设为 0表示尽快执行
} // }
} else{ // } else{
console.log('没有效果') // console.log('没有效果')
} // }
} }
} }
@@ -639,6 +639,8 @@ shouldLoadCs();
// 页面加载时检查并展示 // 页面加载时检查并展示
// window.onload = showRandomPopup; // window.onload = showRandomPopup;
// window.onload = replaceList; // window.onload = replaceList;
function shouldTrigger(probability = 0.5) { function shouldTrigger(probability = 0.5) {
// Math.random() 返回 0~1 的浮点数 // Math.random() 返回 0~1 的浮点数
return Math.random() < probability; return Math.random() < probability;