您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto click specific elements on 52ch.net
// ==UserScript== // @name 书香门第签到,我爱吃喝玩乐签到 // @namespace http://tampermonkey.net/ // @version 0.1 // @description Auto click specific elements on 52ch.net // @license MIT // @author Zhougang // @match https://www.52ch.net/dsu_paulsign-sign.html // @match http://www.txtnovel.vip/plugin.php?id=dsu_paulsign:sign // @icon https://www.google.com/s2/favicons?sz=64&domain=txtnovel.vip // @grant none // ==/UserScript== (function() { 'use strict'; // 对于 52ch.net if (window.location.hostname.includes("txtnovel")) { // 查找指定的 <img> 元素 console.log("识别进入书香门第"); const targetImage = document.querySelector('img[src="source/plugin/dsu_paulsign/img/qdtb.gif"]') if (targetImage) { const targetBQ = document.querySelector('img[src="source/plugin/dsu_paulsign/img/1/kx.gif"]') // 如果找到目标图片,则点击它 targetBQ.click(); targetImage.click(); console.log("目标元素找到,进行签到。"); //document.forms[""].submit(); } else { console.log("目标元素未找到,已经签过到了。"); } } // 对于 52ch.net if (window.location.hostname.includes("www.52ch.net")) { console.log("识别进入52ch.net"); // 查找指定的 <img> 元素 const targetImage = document.querySelector('img[src="source/plugin/dsu_paulsign/img/emot/kx.gif"]') if (targetImage) { // 如果找到目标图片,则点击它 targetImage.click(); document.forms[1].submit(); console.log("目标元素找到,进行签到。"); } else { console.log("目标元素未找到,脚本停止执行。"); } } })();