自动签到

PT自动签到

目前为 2023-03-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         自动签到
// @namespace    shareit
// @version      0.0.1
// @description  PT自动签到
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAgCAYAAACYTcH3AAAAAXNSR0IArs4c6QAAAbxJREFUWEftlz1IQlEUx/9Xn4hBRGNNBdXQh0a1RIsRfdDmUCQ0CAUt0ahCi0sNrrUEDm4NDQ8iomiwIWjRIKmlpaYc4xVU0vPduI8EET/O1ScOvTs+/uec3/ufc97lMRCPqhspgD8FFOcWMQSqXjgC2FBAccxSYhhFJDSqbnAA19TEfzEpAP6A4iDVIYn+L4w3oq05GHY4x3S1tsX2OvHyXEAy8UntLEKbHejrdyK2+1ErJsO5cZaNd8eYL6xtg+GgXoUWwpilGeOrzBfR0gAm2w3DOc8KGLEldY+wPPdawOV5vq62KFhcdqOn10luLRmGTNCE0IapZp7tjO3MxJQLd+kf8n61bGZWgh6MjCo4Vb/JQC2BKYI8Pug4Of5qnzONgpj3E/U6EJbPL7lxdZGHeONKpxkQKZiBQQXrIY/JIKwvB2oWRApGiIU7omg5kBUg0jCVgIbHXCak7LBWajN5ZkqDSx0Sz60AaciZIpQAmltwI5czpNa31p435Az5wyEptGHsW1tyZMB8Ue0GHDOygVbrGcMt84bfNxjjCauTy+bjQND88R+PvvkBx36t31vZ5BL6DDiS9/Guw1/5Ifek+Vvu+AAAAABJRU5ErkJggg==
// @author       shareit
// @include     *://ourbits.club/*
// @include     *://hdhome.org/*
// @include     *://hdchina.org/*
// @include     *://pterclub.com/*
// @include     *://lemonhd.org/*
// @include     *://pthome.net/*
// @include     *://pt.btschool.club/*
// @include     *://pt.soulvoice.club/*
// @include     *://1ptba.com/*
// @include     *://www.hddolby.com/*
// @include     *://hdzone.me/*
// @include     *://hddisk.life/*
// @include     *://carpt.net/*
// @include     *://discfan.net/*
// @include     *://www.hdarea.co/*
// @include     *://hdcity.city/*
// @include     *://dhcmusic.xyz/*
// @include     *://totheglory.im/*
// @include     *://www.nicept.net/*
// @include     *://yingk.com/*
// @include     *://hdstreet.club/*
// @include     *://52pt.site/*
// @include     *://moecat.best/*
// @include     *://pt.hd4fans.org/*
// @include     *://www.haidan.video/*
// @include     *://www.pttime.org/*
// @include     *://hdtime.org/*
// @include     *://hdfans.org/*
// @include     *://audiences.me/*
// @include     *://tjupt.org/*
// @include     *://pt.napqaq.top/*
// @include     *://gainbound.net/*
// @include     *://club.hares.top/*
// @include     *://piggo.me/*
// @include     *://hdatmos.club/*
// @include     *://www.oshen.win/*
// @include     *://pt.2xfree.org/*
// @include     *://wintersakura.net/*
// @include     *://cyanbug.net/*
// @include     *://www.icc2022.com/*
// @include     *://zmpt.cc/*
// @include     *://hdmayi.com/*
// @include     *://hdvideo.one/*
// @include     *://ptchina.org/*
// @grant        none
// @compatible   Chrome
// @compatible   Firefox
// @compatible   Edge
// @compatible   Safari
// @compatible   Opera
// @compatible   UC
// @license MIT
// ==/UserScript==

(function () {
  var host = window.location.host;
  var href = window.location.href;
  setTimeout(function () {

    var attendanceTexts = [
      "签到得魔力",
      "签 到",
      "签到得猫粮",
      "签到",
      "每日签到",
      "簽到得魔力",
      "每日打卡",
      "签到领魔力",
      "每日打卡",
      "每日打卡",
    ]

    var nexusSites = ["oshen", "nicept", "haidan", "pttime", "hdtime", "hdfans", "audiences", "napqaq", "gainbound", "hares", "piggo", "hdatmos", "2xfree", "hddolby", "1ptba", "carpt"
    , "wintersakura", "cyanbug","icc2022","zmpt","hdmayi","hdvideo","ptchina"];

    for (var i in nexusSites) {
      var site = nexusSites[i]
      if (host.indexOf(site) != -1) {
        var ptSignElements = document.getElementsByClassName("faqlink")[0];
        if (ptSignElements == null) {
          ptSignElements = document.querySelectorAll("a.nav-btn:nth-child(3)")[0];
          console.log(ptSignElements)
        }

        if (ptSignElements != null) {
          console.log("签到文字:" + ptSignElements.innerText)
          for (var index in attendanceTexts) {
            var text = attendanceTexts[index]
            console.log("检测:" + text + ", index: " + ptSignElements.innerText.indexOf(text))
            if (ptSignElements.innerText.indexOf(text) != -1 && ptSignElements.innerText.indexOf("已") == -1) {
              console.log("签到:" + site)
              ptSignElements.click();
            }
          }
        }
      }
    }

  }, 500);
})();