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