吾爱打开自动签到

吾爱论坛自动签到

目前为 2022-03-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         吾爱打开自动签到
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  吾爱论坛自动签到
// @author       sugarzhang、院长
// @match        https://www.52pojie.cn/
// @include      *://www.52pojie.cn*
// @grant        GM_addStyle
// @require      https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @require      https://cdn.bootcss.com/sweetalert/2.1.2/sweetalert.min.js
// @require      https://code.jquery.com/jquery-latest.js
// @grant        GM_download
// @grant        GM_openInTab
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_xmlhttpRequest
// @grant        GM_addStyle
// @grant        unsafeWindow
// @grant        GM_setClipboard
// @grant        GM_getResourceURL
// @grant        GM_getResourceText
// @license      GPL License
// ==/UserScript==

$(document).ready(function() {

    //获取签到按钮
    var qiandao = $('#um > p:nth-child(3) > a:nth-child(1)');
    if(qiandao[0] != undefined){
        //模拟点击事件
        qiandao[0].click();
    }


   if(window.location.href == 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2Fforum.php%3Fmod%3Dguide%26view%3Dnewthread'){
      //获取首页a链接
        var shouye = $('#hd > div > div.hdc.cl > h2 > a');
      //模拟首页点击事件,一秒后,跳转首页
       setTimeout(shouye[0].click(),2000);
   }

});