我的世界梦想之都自动签到-玩家版

我的世界梦想之都服务器 - MC找服网签到 MC百科签到

  1. // ==UserScript==
  2. // @name 我的世界梦想之都自动签到-玩家版
  3. // @namespace http://www.mxzd.games/
  4. // @version 1.0.9
  5. // @description 我的世界梦想之都服务器 - MC找服网签到 MC百科签到
  6. // @author 乔木真言
  7. // @license Apache License 2.0
  8. // @match *://*/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=juejin.cn
  10. // @grant GM_registerMenuCommand
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // @grant GM_openInTab
  14. // @grant GM_deleteValue
  15. // @run-at document-idle
  16. // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
  17. // ==/UserScript==
  18.  
  19. (function () {
  20. ("use strict");
  21.  
  22. // Your code here...
  23.  
  24. // 签到网站
  25. const H_zfw = "https://www.fansmc.com/server/731.html";
  26. const H_bk = "https://play.mcmod.cn/sv20186914.html";
  27.  
  28. var host = window.location.host;
  29.  
  30. // 菜单按钮
  31. GM_registerMenuCommand("自动签到", auto, "h");
  32.  
  33. // 进入浏览器自动执行签到
  34. window.onload = autoBtn();
  35.  
  36. function auto() {
  37. GM.openInTab(H_zfw);
  38. GM.openInTab(H_bk);
  39.  
  40. GM_setValue("click", true);
  41. GM.openInTab(H_MxzdHD, { active: true });
  42. }
  43.  
  44. function autoBtn() {
  45. if (host.indexOf("fansmc") > -1) {
  46. // 判断登录(不可用)没登陆
  47. var zfwSignStatus = document.getElementsByClassName("dropdown");
  48. var zfwSignText = zfwSignStatus[2].innerText;
  49. // 登录(不可用)判断
  50. if (!(zfwSignText.indexOf("登录(不可用)") > -1)) {
  51. const btns = document.querySelectorAll(".btn-group");
  52. const btna = btns[2].getElementsByTagName("a");
  53. btna[0].click();
  54.  
  55. GM_setValue("Gzfw", true);
  56. } else {
  57. GM_setValue("Gzfw", false);
  58. // alert("找服网未登录(不可用),无法点赞,请登录(不可用)");
  59. } //判断是不是MC百科
  60. } else if (host.indexOf("mcmod") > -1) {
  61. var bkSignText = document.querySelector(".header-user").innerText;
  62.  
  63. // 登录(不可用)判断
  64. if (!(bkSignText.indexOf("登录(不可用)") > -1)) {
  65. const bkbtn = document.querySelector(".thumbup");
  66. const masterup = document.querySelector(".masterup");
  67. bkbtn.click();
  68.  
  69. if (masterup) {
  70. setTimeout(() => {
  71. masterup.click();
  72. }, 2000);
  73. }
  74. GM_setValue("Gbk", true);
  75. } else {
  76. GM_setValue("Gbk", false);
  77. // alert("MC百科未登录(不可用),无法点赞,请登录(不可用)");
  78. }
  79. }
  80.  
  81. if (host.indexOf("mxzd.games") > -1 && GM_getValue("click")) {
  82. // 检查弹窗状态的函数
  83.  
  84. // 在页面加载时调用检查弹窗状态的函数
  85.  
  86. checkPopupStatus();
  87. }
  88.  
  89. function checkPopupStatus() {
  90. // 获取当前日期
  91. const currentDate = new Date().toDateString();
  92.  
  93. // 从本地存储中获取弹窗状态标记
  94. const popupStatus = localStorage.getItem("popupStatus");
  95.  
  96. // 如果标记不存在或者标记表示上一次弹窗是在前一天
  97. if (!popupStatus || popupStatus !== currentDate) {
  98. // 显示弹窗
  99. displayPopup();
  100.  
  101. // 更新本地存储中的标记为当前日期
  102. localStorage.setItem("popupStatus", currentDate);
  103. }
  104. }
  105.  
  106. // 显示弹窗的函数
  107. function displayPopup() {
  108. GM_setValue("click", false);
  109.  
  110. var now = new Date();
  111. var nowTime =
  112. now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate();
  113.  
  114. if (GM_getValue("Gbk") && GM_getValue("Gzfw")) {
  115. alert(
  116. "百科,找服网,你今日已点赞 截取此弹窗发送至Q群@服主即可获得奖励,时间" +
  117. nowTime
  118. );
  119. //
  120. } else {
  121. alert("未能成功点赞,请检查[ 找服网 ]和[ MC百科 ]是否都已经登录(不可用)");
  122. }
  123. }
  124. }
  125. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址