Greasy Fork

Greasy Fork is available in English.

我的世界梦想之都自动签到

我的世界梦想之都服务器 - MC找服网签到 MC百科签到 苦力怕论坛签到 苦力怕论坛回复

当前为 2023-06-22 提交的版本,查看 最新版本

// ==UserScript==
// @name         我的世界梦想之都自动签到
// @namespace    http://www.mxzd.games/
// @version      1.0.0
// @description  我的世界梦想之都服务器 - MC找服网签到 MC百科签到 苦力怕论坛签到 苦力怕论坛回复
// @author       乔木真言
// @license      Apache License 2.0
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=juejin.cn
// @grant        GM_registerMenuCommand
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-idle
// ==/UserScript==

(function () {
	"use strict";

	// Your code here...

	// 签到网站
	const H_zfw = "https://www.fansmc.com/server/731.html";
	const H_bk = "https://play.mcmod.cn/sv20186914.html";
	const H_klpqd = "https://klpbbs.com/k_misign-sign.html";
	const H_klphf =
		"https://klpbbs.com/forum.php?mod=viewthread&tid=67975&extra=page%3D1&page=1";

	// 菜单按钮
	GM_registerMenuCommand("自动签到", auto, "h");

	// 进入浏览器自动执行签到
	window.onload = autoBtn();

	function auto() {
		window.open(H_zfw);
		window.open(H_bk);
		window.open(H_klpqd);
		window.open(H_klphf);
	}

	function autoBtn() {
		const btns = document.querySelectorAll(".btn-group");
		if (btns.length > 1) {
			const btna = btns[2].getElementsByTagName("a");
			btna[0].click();
		}

		const bkbtn = document.querySelector(".thumbup");
		const masterup = document.querySelector(".masterup");
		if (bkbtn) {
			bkbtn.click();
			masterup.click();
		}
		const text = document.getElementById("fastpostmessage");
		const textBtn = document.getElementById("fastpostsubmit");
		if (text) {
			text.value = "一起来玩吧,欢迎大家";
			textBtn.click();
		}
		const klpqd = document.querySelector(".lineB .qdleft .btn");
		if (klpqd) {
			klpqd.click();
		}
	}
})();