TEMU平台每天第一次启动有大量的弹窗,而且有倒计时才能关闭,手动关闭太麻烦,所以这个脚本会在打开TEMU后台的时候开始检测是否有弹出框,如果有,会自动关闭。
当前为
// ==UserScript==
// @name Temu模态框自动取消
// @namespace http://tampermonkey.net/
// @description TEMU平台每天第一次启动有大量的弹窗,而且有倒计时才能关闭,手动关闭太麻烦,所以这个脚本会在打开TEMU后台的时候开始检测是否有弹出框,如果有,会自动关闭。
// @version 0.1
// @author Monty
// @match https://kuajing.pinduoduo.com*
// @icon
// @grant none
// @license MIT
// ==/UserScript==
function findMD() {
setTimeout(function () {
var mdbody = document.querySelector('.MDL_body_5-67-0')
console.log('查找模态框---------' + mdbody)
if (mdbody != null) {
var yybtn = document.querySelector('.BTN_primary_5-67-0')
yybtn.click()
findMD()
} else {
alert('没有弹出框了')
return
}
}, 2000)
}
(function () {
'use strict';
findMD()
})();