Skip to content

Commit c1b191e

Browse files
committed
修复 论坛暂时关闭签到功能后,自动签到会重复打开错误地址的问题
1 parent c29d5d0 commit c1b191e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

52pojie-Enhanced.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 吾爱破解论坛增强 - 自动签到、翻页
3-
// @version 1.2.2
3+
// @version 1.2.3
44
// @author X.I.U
55
// @description 自动签到、自动无缝翻页(全站)
66
// @match *://www.52pojie.cn/*
@@ -27,7 +27,7 @@
2727

2828
// 注册脚本菜单
2929
function registerMenuCommand() {
30-
var menu_thread_pageLoading_, menu_delateReward_;
30+
let menu_thread_pageLoading_, menu_delateReward_;
3131
if (menu_feedBack_ID){ // 如果反馈菜单ID不是 null,则删除所有脚本菜单
3232
GM_unregisterMenuCommand(menu_thread_pageLoading_ID);
3333
GM_unregisterMenuCommand(menu_delateReward_ID);
@@ -179,7 +179,7 @@
179179
// 自动签到
180180
function qianDao() {
181181
let qiandao = document.querySelector('#um p:last-child a:first-child');
182-
if (qiandao){
182+
if (qiandao && qiandao.href === "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2"){
183183
window.GM_openInTab(qiandao.href, {active: false,insert: true,setParent: true}) // 后台打开签到地址
184184
qiandao.querySelector('.qq_bind').setAttribute('src','https://www.52pojie.cn/static/image/common/wbs.png') // 修改 [打卡签到] 图标为 [签到完毕]
185185
qiandao.href = "#" // 修改 URL 为 #

0 commit comments

Comments
 (0)