Skip to content

Commit a517613

Browse files
committed
修复 自动签到后没有立即返回的问题
1 parent b97c033 commit a517613

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

52pojie-Enhanced.user.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 吾爱破解论坛增强 - 自动签到、翻页
3-
// @version 1.0.4
3+
// @version 1.0.5
44
// @author X.I.U
55
// @description 吾爱破解论坛自动签到、自动翻页
66
// @match *://www.52pojie.cn/*
@@ -18,19 +18,22 @@
1818
// 自动签到
1919
function qianDao() {
2020
var qiandao = document.querySelector('#um p:last-child a:first-child');
21-
if (qiandao != null){
21+
if (!qiandao){
2222
if(qiandao.href === "https://www.52pojie.cn/home.php?mod=task&do=apply&id=2")
2323
{
2424
qiandao.click();
2525
}
2626
}
2727
}
2828

29-
// 签到后返回
29+
// 签到后立即返回
3030
function qianDaoBack() {
31-
var qiandaoback = document.querySelector('#messagetext.alert_btnleft');
32-
if (qiandaoback != null){
33-
qiandaoback.click();
31+
var qiandaoback = document.querySelector('#messagetext p.alert_btnleft a');
32+
if (!qiandaoback){
33+
if(location.href === "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2")
34+
{
35+
qiandaoback.click();
36+
}
3437
}
3538
}
3639

0 commit comments

Comments
 (0)