🎇🎇🎇防沉迷减点料🎇🎇🎇

[❤️支持全面] 已支持4366,37,9377,游戏狗,u7u9,7724,17yy,qq空间部分游戏,07073,7k7k,4399 4399网页游戏还能到点不踢 [⚡️更加快速] 0.99秒急速减料 [😱别怕大人] 大人来了就按"大人键" [✔️高可用率] 持续更新更靠谱 [🕶 手动减料] 防沉迷减料不成功? 对着防沉迷弹窗按快捷键 [😵‍💫智障减料] 误杀率高, 没卵用的实验性功能 [⛔ 强制登录] 7k7k 未成年限制登录个锤子 👍👍👍 热烈庆祝 GreasyFork 总安装量破千 👏👏👏

Version vom 26.07.2022. Aktuellste Version

  1. // ==UserScript==
  2. // @name 🎇🎇🎇防沉迷减点料🎇🎇🎇
  3.  
  4. // @description [❤️支持全面] 已支持4366,37,9377,游戏狗,u7u9,7724,17yy,qq空间部分游戏,07073,7k7k,4399 4399网页游戏还能到点不踢 [⚡️更加快速] 0.99秒急速减料 [😱别怕大人] 大人来了就按"大人键" [✔️高可用率] 持续更新更靠谱 [🕶 手动减料] 防沉迷减料不成功? 对着防沉迷弹窗按快捷键 [😵‍💫智障减料] 误杀率高, 没卵用的实验性功能 [⛔ 强制登录] 7k7k 未成年限制登录个锤子 👍👍👍 热烈庆祝 GreasyFork 总安装量破千 👏👏👏
  5.  
  6. // @namespace https://fcmsb250.github.io/
  7. // @version 4.8.3
  8. // @icon https://dsy4567.github.io/logo.svg
  9. // @author dsy4567 https://greasyfork.org/zh-CN/users/822325 | https://github.com/dsy4567
  10. // @run-at document-start
  11. // @require https://code.jquery.com/jquery-3.6.0.min.js
  12. // @license GPL-3.0
  13.  
  14. // @match *://*.17yy.com/*
  15. // @match *://*.4399.com/*
  16. // @match *://*.7k7k.com/*
  17. // @match *://*.aiwan4399.com/*
  18. // @match *://*.iwan4399.com/*
  19. // @match *://*.zxwyouxi.com/*
  20. // @match *://*.5054399.net/*
  21. // @match *://*.5054399.com/*
  22. // @match *://h5.07073.com/*
  23. // @match *://*.7724.com/*
  24. // @match *://*.u7u9.com/*
  25. // @match *://*.gamedog.cn/*
  26. // @match *://*.9377.com/*
  27. // @match *://*.37.com/*
  28. // @match *://*.4366.com/*
  29.  
  30. // @grant GM_addStyle
  31. // @grant GM_addValueChangeListener
  32. // @grant GM_getValue
  33. // @grant GM_info
  34. // @grant GM_notification
  35. // @grant GM_openInTab
  36. // @grant GM_registerMenuCommand
  37. // @grant GM_setValue
  38. // @grant GM_unregisterMenuCommand
  39. // @grant unsafeWindow
  40.  
  41. // @homepageURL https://fcmsb250.github.io/
  42. // @supportURL https://github.com/dsy4567/Fucking-Anti-Indulgence/
  43.  
  44. // ==/UserScript==
  45.  
  46. /**
  47. * ________ ___ ___ ________ ___ __ ___ _________
  48. * |\ _____\\ \|\ \|\ ____\|\ \|\ \ |\ \|\___ ___\ |
  49. * \ \ \__/\ \ \\\ \ \ \___|\ \ \/ /|_ \ \ \|___ \ \_| |
  50. * \ \ __\\ \ \\\ \ \ \ \ \ ___ \ \ \ \ \ \ \ |
  51. * \ \ \_| \ \ \\\ \ \ \____\ \ \\ \ \ \ \ \ \ \ \ |
  52. * \ \__\ \ \_______\ \_______\ \__\\ \__\ \ \__\ \ \__\ \|/
  53. * \|__| \|_______|\|_______|\|__| \|__| \|__| \|__| v
  54. *
  55. * ________________________________________________________________
  56. * | |
  57. * | 未成年限制登录提醒 |
  58. * | |
  59. * |您使用的是未成年账号,仅周五、周六、周日及法定节假日晚上8:00- |
  60. * |9:00可以游戏!当前已被限制! |
  61. * | |
  62. * | ______________________________________ |
  63. * | | 下次可玩游戏时段 | |
  64. * | | | |
  65. * | | 本周五晚上8:00-9:00 | |
  66. * | |____________________________________| |
  67. * | |
  68. * |温馨提示: |
  69. * |1.如果身份信息有误,请点击》》申请修改《《 |
  70. * |2.如果您身份信息已经变动,可点击》》刷新身份《《 |
  71. * | ____________ ____________ |
  72. * | | | | | |
  73. * | | 更换账号 | | 确定 | |
  74. * | |__________| |__________| |
  75. * |______________________________________________________________|
  76. */
  77.  
  78. "use strict";
  79. var D = new Date();
  80.  
  81. // if (self == top) {
  82. // if (
  83. // GM_getValue("版本") != GM_info.script.version &&
  84. // GM_info.script.version == "4.8.1.1"
  85. // ) {
  86. // GM_notification(
  87. // "快看看有什么新功能吧",
  88. // "🎇🎇🎇防沉迷减点料🎇🎇🎇 更新完毕",
  89. // "",
  90. // () => {
  91. // GM_openInTab(
  92. // "https://greasyfork.org/zh-CN/scripts/437233-%E9%98%B2%E6%B2%89%E8%BF%B7%E5%8A%A0%E7%82%B9%E6%96%99"
  93. // );
  94. // }
  95. // );
  96. // }
  97. // }
  98.  
  99. function 改变值(值, 默认值, 回调) {
  100. if (GM_getValue(值, 默认值) == "1") {
  101. GM_setValue(值, "0");
  102. } else if (GM_getValue(值, 默认值) == "0") {
  103. GM_setValue(值, "1");
  104. } else {
  105. GM_setValue(值, 默认值);
  106. }
  107. if (回调) {
  108. 回调();
  109. }
  110. }
  111. function 初始化值(值, 默认值, 回调) {
  112. if (GM_getValue(值, "天知道是啥") == "天知道是啥") {
  113. GM_setValue(值, 默认值);
  114. }
  115. if (回调) {
  116. 回调();
  117. }
  118. }
  119. function 检测状态(值) {
  120. if (GM_getValue(值) == "1") {
  121. return "✅已启用 ";
  122. } else if (GM_getValue(值) == "0") {
  123. return "❌已停用 ";
  124. } else {
  125. return "⚠️配置错误 ";
  126. }
  127. }
  128. function qs(选择器) {
  129. return document.querySelector(选择器);
  130. }
  131. function qsa(选择器) {
  132. return document.querySelectorAll(选择器);
  133. }
  134.  
  135. // GM_setValue("版本", GM_info.script.version);
  136. 初始化值("安装日期", String(Math.floor(D.getTime() / 1000 / 60 / 60 / 24)));
  137. 初始化值("已提建议", "0");
  138. 初始化值("停用快捷键", "0");
  139. 初始化值("开发环境", "0");
  140.  
  141. var 用了多少天 =
  142. Math.ceil(D.getTime() / 1000 / 60 / 60 / 24) -
  143. Number(GM_getValue("安装日期"));
  144. var 减料成功 = 0;
  145. var 一个弹窗的样式 = { remove: () => {} };
  146. var 最后一个菜单id = 0;
  147. var 游戏真实地址_17yy = "";
  148. /**
  149. * @type {Function}
  150. */
  151. var _playLoading;
  152. var 开发者配置 = {};
  153.  
  154. const 网址 = location.href;
  155. const 脚本信息 = JSON.stringify({
  156. 浏览器: navigator.userAgent,
  157. 脚本能更新: GM_info.scriptWillUpdate,
  158. 脚本版本: GM_info.script.version,
  159. 脚本更新地址: GM_info.script.updateURL,
  160. 脚本管理器: GM_info.scriptHandler,
  161. 脚本管理器版本: GM_info.version,
  162. 用多久: 用了多少天,
  163. });
  164.  
  165. if (GM_getValue("开发环境") == "1") {
  166. 开发者配置.启用控制台输出 = 1;
  167. // 开发者配置.启用调试 = 1;
  168. 开发者配置.禁用自动防沉迷减料 = 1;
  169. 开发者配置.在控制台使用脚本变量函数和GM = 1;
  170. } else {
  171. 开发者配置.启用控制台输出 = 0;
  172. 开发者配置.启用调试 = 0;
  173. 开发者配置.禁用自动防沉迷减料 = 0;
  174. 开发者配置.在控制台使用脚本变量函数和GM = 0;
  175. }
  176.  
  177. var 一堆伞兵玩意 = [
  178. "#addiv",
  179. "#anti-indulge",
  180. "#anti-indulge-prompt",
  181. "#Anti_mask",
  182. "#Anti_open",
  183. "#app > div > div.cover.splash",
  184. "#chCoverDiv",
  185. "#codepop6",
  186. "#cover",
  187. "#div_dialog",
  188. "#easyDialogBox",
  189. "#fcmIframe",
  190. "#Guide",
  191. "#loginCertify",
  192. "#messageBox",
  193. "#overlay",
  194. "#page_wallpaper > div.xiaowei.xiaowei-orange > div.xw-left > div.xw-game > div.xw-top > div > div",
  195. "#pop2",
  196. "#pusher",
  197. "#shadow",
  198. "#swfdiv > div.box",
  199. "#tc100",
  200. "#yx_log",
  201.  
  202. ".codegs",
  203. ".cmMask",
  204. ".fixedModal",
  205. ".mask",
  206. ".play_load",
  207. ".popup-c",
  208. ".realName",
  209. ".sdkDialog",
  210. ".toolDialog",
  211. ".ui-forbidden",
  212. ".webtipss",
  213.  
  214. "body > div.show_box.popup_bg",
  215. ];
  216.  
  217. /**
  218. * 为某个字符串获取两个字符串中间的字符串(不包括那两个字符串)
  219. * @param {String} 开始
  220. * @param {String} 结束
  221. * @param {String} 值
  222. * @param {String} 类型 "1": 网址, "2": 字母 + 数字, "3": 数字
  223. * @param {String} 前面追加
  224. * @returns {String}
  225. */
  226. function 获取中间(开始, 结束, 值, 类型, 前面追加) {
  227. = 值.substring(值.indexOf(开始) + 开始.length);
  228. if (结束) {
  229. = decodeURI(值.substring(0, 值.indexOf(结束)));
  230. }
  231. if (前面追加) {
  232. = 前面追加 + 值;
  233. }
  234. switch (类型) {
  235. case "1":
  236. if (
  237. !(
  238. 值.substring(0, 2) == "//" ||
  239. 值.substring(0, 7) == "http://" ||
  240. 值.substring(0, 8) == "https://"
  241. )
  242. ) {
  243. throw new Error("不正确的字符串");
  244. }
  245. break;
  246. case "2":
  247. if (!/^[0-9a-zA-Z]*$/g.test(值)) {
  248. throw new Error("不正确的字符串");
  249. }
  250. break;
  251. case "3":
  252. if (isNaN(Number(值))) {
  253. throw new Error("不正确的字符串");
  254. }
  255. break;
  256.  
  257. default:
  258. break;
  259. }
  260. return 值;
  261. }
  262.  
  263. function 首字母大写(str) {
  264. str = str[0].toUpperCase() + str.substring(1, str.length);
  265. return str;
  266. }
  267.  
  268. function log(a, b, c, d, e, f, g) {
  269. if (开发者配置.启用控制台输出) console.log(a, b, c, d, e, f, g);
  270. }
  271.  
  272. function 智障减料() {
  273. let 游戏元素idclass = ["flash", "game", "play", "youxi", "swf", "flash"];
  274. let 防沉迷元素idclass = [
  275. "anti",
  276. "fcm",
  277. "verify",
  278. "mask",
  279. "certify",
  280. "dialog",
  281. "popup",
  282. "login",
  283. "cover",
  284. ];
  285. let 临时数组 = [];
  286. let 样式表 = "";
  287.  
  288. 游戏元素idclass.forEach((str) => {
  289. 临时数组.push(
  290. "iframe[id*='" + str + "'],",
  291. "iframe[class*='" + str + "'],",
  292. "iframe[id*='" + str.toUpperCase() + "'],",
  293. "iframe[class*='" + str.toUpperCase() + "'],",
  294. "iframe[id*='" + 首字母大写(str) + "'],",
  295. "iframe[class*='" + 首字母大写(str) + "'],"
  296. );
  297. });
  298. 临时数组.forEach((str) => {
  299. 样式表 += str;
  300. });
  301. 样式表 += `#ctmdfcm
  302. {
  303. display: block !important;
  304. left: 0 !important;
  305. top: 0 !important;
  306. position: absolute !important;
  307. z-index: 999999 !important;
  308. }`;
  309. 临时数组 = [];
  310.  
  311. 防沉迷元素idclass.forEach((str) => {
  312. 临时数组.push(
  313. "[id*='" + str + "'],",
  314. "[class*='" + str + "'],",
  315. "[id*='" + str.toUpperCase() + "'],",
  316. "[class*='" + str.toUpperCase() + "'],",
  317. "[id*='" + 首字母大写(str) + "'],",
  318. "[class*='" + 首字母大写(str) + "'],"
  319. );
  320. });
  321. 临时数组.forEach((str) => {
  322. 样式表 += str;
  323. });
  324. 样式表 += `#ctmdfcm
  325. {
  326. display: none !important;
  327. min-width: 0 !important;
  328. width: 0 !important;
  329. max-width: 0 !important;
  330. min-height: 0 !important;
  331. height: 0 !important;
  332. max-height: 0 !important;
  333. z-index: -999 !important;
  334. font-size: 0 !important;
  335. overflow: hidden !important;
  336. }`;
  337. 临时数组 = [];
  338.  
  339. GM_addStyle(样式表);
  340. }
  341.  
  342. // function get(url, call) {
  343. // let xhr = new XMLHttpRequest();
  344. // let response = "";
  345. // xhr.open("get", url);
  346. // xhr.send(null);
  347. // xhr.onload = () => {
  348. // response = xhr.responseText;
  349. // call(response);
  350. // };
  351. // }
  352.  
  353. // function ajax(o) {
  354. // let xhr = new XMLHttpRequest();
  355. // let response = "";
  356. // xhr.open("post", o.url);
  357. // xhr.send("action=getStatus&id=" + o.data.id);
  358. // xhr.onload = () => {
  359. // response = xhr.responseText;
  360. // o.success(JSON.parse(response));
  361. // };
  362. // }
  363.  
  364. function 更新菜单() {
  365. const 一堆菜单 = [
  366. ["⚠️沉迷于游戏不利于身心健康,请合理安排游戏时间,适度游戏⚠️"],
  367. ["❤️您已尽情欢乐" + 用了多少天 + "天", undefined, undefined, 1],
  368. [
  369. "✨没有防沉迷的游戏平台(作者没有收钱)",
  370. () => {
  371. GM_openInTab("https://fcmsb250.github.io/no-anti.html");
  372. },
  373. undefined,
  374. 1,
  375. ],
  376. [
  377. "👉再次减料按 alt + 鼠标中键",
  378. () => {
  379. 减料成功 = 0;
  380. if (_playLoading) {
  381. unsafeWindow.play22.playLoading = _playLoading;
  382. }
  383. 减料();
  384. 普通减料();
  385. },
  386. undefined,
  387. ],
  388. [
  389. "👉大人来了按 shift + 鼠标中键 (解除请再次减料)",
  390. () => {
  391. 大人来了();
  392. },
  393. undefined,
  394. ],
  395. [
  396. "👉手动减料对着防沉迷按 shift + alt + 鼠标右键",
  397. () => {
  398. alert("手动减料对着防沉迷按 shift + alt + 鼠标右键");
  399. },
  400. undefined,
  401. ],
  402. [
  403. "👉智障减料(不保证实用性)",
  404. () => {
  405. GM_setValue("开始智障减料", Math.random());
  406. },
  407. undefined,
  408. ],
  409. [
  410. 检测状态("停用快捷键") + " 停用快捷键",
  411. () => {
  412. 改变值("停用快捷键", "0", () => {
  413. 更新菜单();
  414. });
  415. },
  416. undefined,
  417. ],
  418. [
  419. "👍给个好评/📝反馈问题",
  420. () => {
  421. GM_openInTab(
  422. "https://greasyfork.org/zh-CN/scripts/437233/feedback"
  423. );
  424. },
  425. undefined,
  426. ],
  427. [
  428. "⛔解决访问错误",
  429. () => {
  430. location.href = 网址;
  431. },
  432. undefined,
  433. ],
  434. [
  435. "⛔7k7k强制登录",
  436. () => {
  437. location.href =
  438. "http://www.7k7k.com/swf/204220.htm?fai-doLogin";
  439. },
  440. undefined,
  441. ],
  442. ];
  443. 最后一个菜单id = 一堆菜单.length;
  444.  
  445. // TM
  446. for (
  447. let 菜单id = 最后一个菜单id - 一堆菜单.length * 2;
  448. 菜单id < 最后一个菜单id + 一堆菜单.length * 2;
  449. 菜单id++
  450. ) {
  451. GM_unregisterMenuCommand(菜单id);
  452. }
  453.  
  454. // VM
  455. 一堆菜单.forEach((菜单) => {
  456. GM_unregisterMenuCommand(菜单[0]);
  457. });
  458. GM_unregisterMenuCommand("✅已启用 停用快捷键");
  459. GM_unregisterMenuCommand("❌已停用 停用快捷键");
  460. GM_unregisterMenuCommand("⚠️配置错误 停用快捷键");
  461.  
  462. 一堆菜单.forEach((菜单) => {
  463. const 菜单名 = 菜单[0];
  464. const 函数 = 菜单[1];
  465. const 快捷键 = 菜单[2];
  466.  
  467. 最后一个菜单id = GM_registerMenuCommand(菜单名, 函数, 快捷键);
  468. });
  469. }
  470.  
  471. function 大人来了() {
  472. log("[防沉迷减点料] 大人来了");
  473. try {
  474. 一个弹窗的样式.remove();
  475. log("[防沉迷减点料] 已去除样式");
  476. } catch (err) {}
  477.  
  478. 一个弹窗的样式 = GM_addStyle(
  479. '*{margin:0;padding:0}ul{list-style:none;}.fl{float:left;}.fr{float:right;}.mysdkDialog{position:absolute;left:50%;top:50vh;margin:-210px 0 0 -309px;width:618px;z-index:20020}.mysdkDialog .myfcmdialog{color:black;position:absolute;left:0;top:0;width:620px;padding-bottom:30px;font-family:"microsoft yahei";font-size:14px;background:#fff;border-radius:8px;}.mysdkDialog .myfcmdialog .close-btn{position:absolute;right:0;top:0;width:40px;height:40px;background-color:red;line-height:40px;cursor:pointer;display:none}.mysdkDialog .myfcmdialog .title{line-height:30px;text-align:center;font-size:22px;font-weight:700;padding:25px 0 0;margin:0 40px;color:#454545;border:0;height:auto;float:none;width:auto;text-indent:0;}.mysdkDialog .myfcmdialog .stitle{text-align:left;line-height:1.6;margin:15px 40px 0;font-size:16px;}.mysdkDialog .myfcmdialog .stitle span{color:#ffa92d;}.mysdkDialog .myfcmdialog .mod-tip{margin:20px 40px 0;background:#F0F0F0;padding:12px 15px;border-radius:4px;color:#333;text-align:left}.mysdkDialog .myfcmdialog .tip-title{font-size:16px;font-weight:400;}.mysdkDialog .myfcmdialog .tip-info{margin-top:5px;line-height:26px;font-size:14px;}.mysdkDialog .myfcmdialog .tip-info li{font-size:16px;line-height:26px}.mysdkDialog .myfcmdialog .tip-info a{color:#FAA61B;text-decoration:underline;margin:0 4px;cursor:pointer;}.mysdkDialog .myfcmdialog .mod-btn{text-align:center;font-size:0;line-height:0;margin:25px 40px 0;}.mysdkDialog .myfcmdialog .mod-btn .btn-fcmprimary{display:inline-block;width:140px;height:38px;line-height:38px;border:1px solid #69bb01;color:#69bb01;font-size:14px;margin:0 15px;border-radius:5px;cursor:pointer;}.mysdkDialog .myfcmdialog .mod-btn .fr,.mysdkDialog .myfcmdialog .mod-btn .fl{width:250px;margin:0;}.mysdkDialog .myfcmdialog .mod-btn .btn-fcmprimary:hover{-webkit-filter:brightness(1);filter:brightness(1)}.mysdkDialog .myfcmdialog .mod-btn .btn-identity{background-color:#69bb01;color:#f8ffef}.fcmIframe{position:absolute;left:50%;top:270px;margin:0 0 0 -309px;width:618px;height:354px;z-index:2019;border:0 none;background-color:#000}.countDown{background:#eee;border-radius:3px;padding:10px;text-align:center;margin:20px 40px 0;font-size:16px;color:#666}.countDown .txt1{font-size:16px;height:28px;line-height:28px;color:#717171;}.countDown .txt2{height:40px;line-height:40px;font-size:26px;font-weight:bold;color:#54ba3d;}.mycmMask{display:none;width:100%;position:absolute;left:0;top:0;background:rgb(0,0,0);}'
  480. ); // 不知道从哪借(chao)鉴(xi)来的
  481. let 一个弹窗 = document.createElement("div");
  482. 一个弹窗.className = "mysdkDialog";
  483. 一个弹窗.innerHTML +=
  484. '<div class="myfcmdialog"><span class="close-btn">关闭</span><h2 class="title">未成年限制登录提醒</h2><div class="stitle">您使用的是未成年账号,仅周五、周六、周日及法定节假日晚上8:00-9:00可以游戏!当前已被限制!</div><div class="countDown" style=""><p class="txt1">下次可玩游戏时段</p><p class="txt2">本周五晚上8:00-9:00</p></div><div class="countDown" style="display:none">当前已限制游戏</div><div class="mod-tip" style=""><h3 class="tip-title">温馨提示:</h3><ul class="tip-info">1.如果身份信息有误,请点击<a href="https://u.4399.com/profile/realname-bizId-1199006632.html" target="_blank">》》申请修改《《</a><br>2.如果您身份信息已经变动,可点击<a target="_self" href="#">》》刷新身份《《</a></ul></div><div class="mod-btn" style=""><span class="btn-fcmprimary">更换账号</span><span class="btn-fcmprimary">确定</span></div></div>';
  485. // 不知道从哪借(chao)鉴(xi)来的
  486. document.body.appendChild(一个弹窗);
  487. let 遮罩 = document.createElement("div");
  488. 遮罩.className = "mycmMask";
  489. 遮罩.style.cssText =
  490. "height: " +
  491. document.documentElement.offsetHeight +
  492. "px; z-index: 9999; display: block";
  493. 遮罩.innerHTML = "";
  494. document.body.appendChild(遮罩);
  495. }
  496.  
  497. function 减料() {
  498. if (减料成功) {
  499. return log("[防沉迷减点料] 减料被取消");
  500. }
  501.  
  502. let 开始 = new Date().getTime();
  503.  
  504. let $full_screen_frame = qs("#full_screen_frame");
  505. let $app_canvas_frame = qs("#app_canvas_frame");
  506. let $ifm = qs("#ifm");
  507.  
  508. if (网址.includes("4399")) {
  509. // 搞破坏
  510. if (开发者配置.启用调试) {
  511. debugger;
  512. }
  513.  
  514. try {
  515. Object.defineProperty(unsafeWindow, "smevent", {
  516. value: null, // 原来是Function, 这样做可以使防沉迷报错
  517. writable: false,
  518. });
  519. 减料成功 = 1;
  520. } catch (e) {}
  521. try {
  522. Object.defineProperty(unsafeWindow, "PageWebApiSdk", {
  523. value: null,
  524. writable: false,
  525. });
  526. 减料成功 = 1;
  527. } catch (e) {}
  528. try {
  529. Object.defineProperty(unsafeWindow, "getBizid", {
  530. value: null,
  531. writable: false,
  532. });
  533. 减料成功 = 1;
  534. } catch (e) {}
  535. } else if (unsafeWindow.play22 && 网址.includes("7k7k.com")) {
  536. // 7k7k获取游戏直链1
  537. if (开发者配置.启用调试) {
  538. debugger;
  539. }
  540.  
  541. try {
  542. log("[防沉迷减点料] 尝试7k7k防沉迷减料");
  543. if (开发者配置.启用调试) {
  544. debugger;
  545. }
  546. // unsafeWindow.Play24.prototype.playLoading();
  547. unsafeWindow.play22.playLoading();
  548. if (!_playLoading) {
  549. _playLoading = unsafeWindow.play22.playLoading;
  550. }
  551. unsafeWindow.play22.playLoading = () => {}; // 防止重复调用
  552. 减料成功 = 1;
  553. // unsafeWindow.Play24.prototype.playLoading = ()=> {};
  554. } catch (err) {
  555. console.error(err);
  556. }
  557. } else if ($ifm && 网址.includes("m.7k7k.com/player")) {
  558. if (开发者配置.启用调试) {
  559. debugger;
  560. }
  561.  
  562. if ($ifm.src != location.href && $ifm.src) {
  563. // 7k7k获取游戏直链2
  564. try {
  565. log("[防沉迷减点料] 尝试7k7k手机端防沉迷减料");
  566. if (开发者配置.启用调试) {
  567. debugger;
  568. }
  569. 减料成功 = 1;
  570. location.href = $ifm.src;
  571. } catch (err) {
  572. console.error(err);
  573. }
  574. }
  575. } else if (网址.includes("h5.7k7k.com/web/H5GAMES.html")) {
  576. if (开发者配置.启用调试) {
  577. debugger;
  578. }
  579.  
  580. // 7k7k获取游戏直链3
  581. try {
  582. log("[防沉迷减点料] 尝试7k7k h5页游防沉迷减料");
  583. if (开发者配置.启用调试) {
  584. debugger;
  585. }
  586.  
  587. $.get(
  588. "http://h5.7k7k.com/api_redirect/game/start/?client=0&account=" +
  589. 获取中间("userid=", ";", document.cookie, "2") +
  590. "&appkey=" +
  591. 获取中间("gid=", "&", 网址, "2") +
  592. "&uid=" +
  593. 获取中间("userid=", ";", document.cookie, "2") +
  594. "&tid=" +
  595. 获取中间("tid=", "&", 网址, "2"),
  596. (json) => {
  597. location.href = JSON.parse(json).url;
  598. }
  599. );
  600. 减料成功 = 1;
  601. } catch (err) {
  602. console.error(err);
  603. }
  604. } else if (网址.includes("h5.7k7k.com/game/")) {
  605. // 7k7k获取游戏直链3
  606. try {
  607. if (开发者配置.启用调试) {
  608. debugger;
  609. }
  610.  
  611. console.log("[防沉迷减点料] 尝试7k7k h5页游(手机端)防沉迷破解");
  612. _$.get(
  613. "http://h5.7k7k.com/api_redirect/game/start/?client=0&account=" +
  614. 获取中间("userid=", ";", document.cookie, "2") +
  615. "&appkey=" +
  616. // eslint-disable-next-line no-undef
  617. unsafeWindow.gid[0] +
  618. "&uid=" +
  619. 获取中间("userid=", ";", document.cookie, "2") +
  620. "&tid=" +
  621. // eslint-disable-next-line no-undef
  622. unsafeWindow.tid,
  623. (json) => {
  624. let url = JSON.parse(json).url;
  625. if (url) location.href = url;
  626. }
  627. );
  628. 减料成功 = 1;
  629. } catch (err) {
  630. console.error(err);
  631. }
  632. } else if ($app_canvas_frame) {
  633. if (开发者配置.启用调试) {
  634. debugger;
  635. }
  636.  
  637. try {
  638. if ($app_canvas_frame.src && $app_canvas_frame.src != 网址) {
  639. log("[防沉迷减点料] 尝试阻止QQ空间自动跳转1");
  640. if (开发者配置.启用调试) {
  641. debugger;
  642. }
  643. 减料成功 = 1;
  644. location.href = $app_canvas_frame.src;
  645. }
  646. } catch (err) {
  647. console.error(err);
  648. }
  649. } else if ($full_screen_frame) {
  650. if (开发者配置.启用调试) {
  651. debugger;
  652. }
  653.  
  654. try {
  655. if ($full_screen_frame.src && $full_screen_frame.src != 网址) {
  656. log("[防沉迷减点料] 尝试阻止QQ空间自动跳转2");
  657. if (开发者配置.启用调试) {
  658. debugger;
  659. }
  660. 减料成功 = 1;
  661. location.href = $full_screen_frame.src;
  662. }
  663. } catch (err) {
  664. console.error(err);
  665. }
  666. } else if (网址.includes("//i.7724.com/user/danjilogin?url=")) {
  667. if (开发者配置.启用调试) {
  668. debugger;
  669. }
  670.  
  671. try {
  672. log("[防沉迷减点料] 尝试7724防沉迷减料");
  673. // var url = 网址.substring(网址.indexOf("danjilogin?url=") + "danjilogin?url=".length);
  674. // if (
  675. // url.substring(0, 2) == "//" ||
  676. // url.substring(0, 7) == "http://" ||
  677. // url.substring(0, 8) == "https://"
  678. // ) {
  679. // }
  680. let url = 获取中间("danjilogin?url=", undefined, 网址, "1");
  681. location.href = url;
  682. 减料成功 = 1;
  683. } catch (err) {}
  684. } else if (网址.includes("wvw.9377.com/game_login.php")) {
  685. if (开发者配置.启用调试) {
  686. debugger;
  687. }
  688.  
  689. try {
  690. log("[防沉迷减点料] 尝试9377防沉迷减料");
  691. $.get(网址, (html) => {
  692. // var url = html.substring(
  693. // html.indexOf('id="iframe" src="') + 'id="iframe" src="'.length,
  694. // html.indexOf('" name="mainFrame" scrolling="auto"')
  695. // );
  696. let url = 获取中间(
  697. 'id="iframe" src="',
  698. '" name="mainFrame" scrolling="auto"',
  699. html,
  700. "1"
  701. );
  702. location.href = url;
  703. });
  704. 减料成功 = 1;
  705. } catch (err) {}
  706. } else if (网址.includes("game.37.com/play.php")) {
  707. if (开发者配置.启用调试) {
  708. debugger;
  709. }
  710.  
  711. try {
  712. log("[防沉迷减点料] 尝试37防沉迷减料");
  713. $.get(网址, (html) => {
  714. // var url = html.substring(
  715. // html.indexOf('src="//gameapp.37.com/controller/enter_game.php') +
  716. // 'src="'.length,
  717. // html.indexOf('" id="mainFrame"')
  718. // );
  719. let url = 获取中间(
  720. 'src="//gameapp.37.com/controller/enter_game.php',
  721. '" id="mainFrame"',
  722. html,
  723. "1",
  724. "//gameapp.37.com/controller/enter_game.php"
  725. );
  726. location.href = url;
  727. });
  728. 减料成功 = 1;
  729. } catch (err) {}
  730. } else if (网址.includes("wvw.4366.com/game_login.php")) {
  731. if (开发者配置.启用调试) {
  732. debugger;
  733. }
  734.  
  735. try {
  736. log("[防沉迷减点料] 尝试4366防沉迷减料");
  737. $.get(网址, (html) => {
  738. // var url = html.substring(
  739. // html.indexOf('align="left" id="iframe" src="') +
  740. // 'align="left" id="iframe" src="'.length,
  741. // html.indexOf('" name="mainFrame" scrolling="auto"')
  742. // // );
  743. // if (
  744. // url.substring(0, 2) == "//" ||
  745. // url.substring(0, 7) == "http://" ||
  746. // url.substring(0, 8) == "https://"
  747. // ) {
  748. // location.href = url;
  749. // }
  750. let url = 获取中间(
  751. 'align="left" id="iframe" src="',
  752. '" name="mainFrame" scrolling="auto"',
  753. html,
  754. "1"
  755. );
  756. location.href = url;
  757. });
  758. 减料成功 = 1;
  759. } catch (err) {}
  760. } else if (网址.includes("www.17yy.com/f/play")) {
  761. if (开发者配置.启用调试) {
  762. debugger;
  763. }
  764.  
  765. try {
  766. try {
  767. if (qs("#flashgame").src == 游戏真实地址_17yy) return;
  768. } catch (e) {}
  769. try {
  770. if (qs("#flash_frame").src == 游戏真实地址_17yy) return;
  771. } catch (e) {}
  772.  
  773. $.ajax({
  774. url: "http://www.17yy.com/e/payapi/vip_ajax.php",
  775. data: {
  776. action: "getStatus",
  777. id: 获取中间("/f/play/", ".html", 网址, "3"),
  778. },
  779. type: "POST",
  780. dataType: "json",
  781. success: function (resp) {
  782. try {
  783. qs("#flashgame").src = 游戏真实地址_17yy =
  784. "http://" +
  785. unsafeWindow.server +
  786. "/" +
  787. unsafeWindow.classes +
  788. "/" +
  789. unsafeWindow.date +
  790. "/" +
  791. resp.data.game_path;
  792. } catch (e) {}
  793. try {
  794. qs("#flash_frame").src = 游戏真实地址_17yy =
  795. "http://" +
  796. unsafeWindow.server +
  797. "/" +
  798. unsafeWindow.classes +
  799. "/" +
  800. unsafeWindow.date +
  801. "/" +
  802. resp.data.game_path;
  803. } catch (e) {}
  804. },
  805. });
  806. 减料成功 = 1;
  807. } catch (err) {}
  808. }
  809.  
  810. if (开发者配置.输出减料时间) {
  811. log(
  812. "[防沉迷减点料] 减料结束, 用时" +
  813. (new Date().getTime() - 开始) +
  814. "ms"
  815. );
  816. }
  817. }
  818.  
  819. function 普通减料() {
  820. try {
  821. // 简单暴力的减料方式
  822. for (let 索引 = 0; 索引 < 一堆伞兵玩意.length; 索引++) {
  823. const element = 一堆伞兵玩意[索引];
  824. if (qsa(element)[0]) {
  825. qsa(element).forEach((el) => {
  826. el.remove();
  827. log("[防沉迷减点料] -减料成功- " + element);
  828. });
  829. }
  830. }
  831.  
  832. [".mycmMask", ".myfcmdialog", ".mysdkDialog"].forEach((element) => {
  833. if (qsa(element)[0]) {
  834. qsa(element).forEach((el) => {
  835. el.remove();
  836. log("[防沉迷减点料] -解除大人来了成功- " + element);
  837. });
  838. }
  839. });
  840.  
  841. try {
  842. 一个弹窗的样式.remove();
  843. log("[防沉迷减点料] 已去除样式");
  844. } catch (err) {}
  845. } catch (err) {
  846. console.error(err);
  847. }
  848. }
  849.  
  850. function 减点料() {
  851. // 多来几次以防万一
  852. if (!开发者配置.禁用自动防沉迷减料) {
  853. 减料();
  854. for (let i = 1; i < 10; i++) {
  855. setTimeout(减料, i * 500);
  856. }
  857. }
  858. }
  859.  
  860. // 加样式表
  861. if (!开发者配置.禁用自动防沉迷减料) {
  862. let css = "";
  863. for (let 索引 = 0; 索引 < 一堆伞兵玩意.length; 索引++) {
  864. const element = 一堆伞兵玩意[索引];
  865. css += element + ",";
  866. }
  867. css += `#ctmdfcm
  868. {
  869. display: none !important;
  870. min-width: 0 !important;
  871. width: 0 !important;
  872. max-width: 0 !important;
  873. min-height: 0 !important;
  874. height: 0 !important;
  875. max-height: 0 !important;
  876. z-index: -999 !important;
  877. font-size: 0 !important;
  878. overflow: hidden !important;
  879. }`;
  880. GM_addStyle(css);
  881. log("[防沉迷减点料] 加样式表成功");
  882. }
  883.  
  884. // 一些无关紧要的代码
  885. (async () => {
  886. GM_addValueChangeListener(
  887. "开始智障减料",
  888. (name, old_value, new_value, remote) => {
  889. 智障减料();
  890. }
  891. );
  892.  
  893. if (self == top) {
  894. //判断是否在iframe中
  895. // 烦人的提醒
  896. if (用了多少天 >= 3 && GM_getValue("已提建议") == "0") {
  897. GM_setValue("已提建议", "1");
  898. GM_notification(
  899. "请给我提点建议,帮助这个脚本变得更好",
  900. "🎇🎇🎇防沉迷减点料🎇🎇🎇 用的怎样?",
  901. "",
  902. () => {
  903. GM_openInTab(
  904. "https://greasyfork.org/zh-CN/scripts/437233/feedback"
  905. );
  906. }
  907. );
  908. }
  909. 更新菜单();
  910.  
  911. // 精美图片
  912. log(
  913. "%c ",
  914. "font-size:512px;background-size:100% 100%;background-repeat:no-repeat;background-image:url(https://fcmsb250.github.io/fuck-anti.webp);"
  915. );
  916. }
  917.  
  918. // 快捷键
  919. document.addEventListener(
  920. "mousedown",
  921. function (e) {
  922. if (GM_getValue("停用快捷键") == "0") {
  923. if (e.button == 1 && e.shiftKey && !e.altKey) {
  924. 大人来了();
  925. }
  926. if (e.button == 2 && e.shiftKey && e.altKey) {
  927. let el = document.elementFromPoint(e.x, e.y);
  928. log(
  929. "[防沉迷减点料] -手动减料成功- ." +
  930. el.className +
  931. " #" +
  932. el.id +
  933. " <" +
  934. el.tagName +
  935. ">"
  936. );
  937. el.style.display = "none";
  938. }
  939. if (e.button == 1 && e.altKey && !e.shiftKey) {
  940. 减料成功 = 0;
  941. 减料();
  942. 普通减料();
  943. }
  944. }
  945. },
  946. true
  947. );
  948.  
  949. if (网址.includes("ptlogin.4399.com")) {
  950. setTimeout(() => {
  951. if (document.querySelector(".ptlogin_btn")) {
  952. document
  953. .querySelector(".ptlogin_btn")
  954. .addEventListener("mouseup", () => {
  955. alert("请在稍后刷新网页");
  956. });
  957. }
  958. }, 1000);
  959. }
  960.  
  961. if (location.host == "www.7k7k.com") {
  962. try {
  963. document.querySelector("div.login_no").title =
  964. "✨防沉迷减点料支持7k7k强制登录, 请移步至脚本菜单";
  965. } catch (e) {}
  966.  
  967. if (location.href.includes("fai-doLogin"))
  968. document
  969. .querySelector("div.login_no > div.h_login.login_btn > span")
  970. .click();
  971. }
  972.  
  973. if (qs("script[src*='chpenmljpdpkebnohfbbdpfelabcnlnp']")) {
  974. GM_registerMenuCommand(
  975. "⚠️您已经安装了防沉迷终结者, 不推荐二者同时使用"
  976. );
  977. }
  978.  
  979. if (开发者配置.在控制台使用脚本变量函数和GM) {
  980. unsafeWindow.更新在控制台使用的脚本变量函数和GM = () => {
  981. // GM_*
  982. unsafeWindow._GM_addStyle = GM_addStyle;
  983. unsafeWindow._GM_getValue = GM_getValue;
  984. unsafeWindow._GM_info = GM_info;
  985. unsafeWindow._GM_notification = GM_notification;
  986. unsafeWindow._GM_openInTab = GM_openInTab;
  987. unsafeWindow._GM_registerMenuCommand = GM_registerMenuCommand;
  988. unsafeWindow._GM_setValue = GM_setValue;
  989. unsafeWindow._GM_unregisterMenuCommand = GM_unregisterMenuCommand;
  990.  
  991. // 普通变量
  992. unsafeWindow._D = D;
  993. unsafeWindow._最后一个菜单id = 最后一个菜单id;
  994. // unsafeWindow._玩了几分钟 = 玩了几分钟;
  995. unsafeWindow._用了多少天 = 用了多少天;
  996. unsafeWindow._减料成功 = 减料成功;
  997. unsafeWindow._脚本信息 = 脚本信息;
  998. unsafeWindow._开发者配置 = 开发者配置;
  999. unsafeWindow._一堆伞兵玩意 = 一堆伞兵玩意;
  1000.  
  1001. // 自定函数
  1002. unsafeWindow._改变值 = 改变值;
  1003. unsafeWindow._初始化值 = 初始化值;
  1004. unsafeWindow._检测状态 = 检测状态;
  1005. unsafeWindow._更新菜单 = 更新菜单;
  1006. unsafeWindow._大人来了 = 大人来了;
  1007. // unsafeWindow._检测网址是否包含指定字符串 =
  1008. // 检测网址是否包含指定字符串;
  1009. // unsafeWindow._游戏中 = 游戏中;
  1010. unsafeWindow._减料 = 减料;
  1011. unsafeWindow._普通减料 = 普通减料;
  1012. unsafeWindow._减点料 = 减点料;
  1013. unsafeWindow._一个弹窗的样式 = 一个弹窗的样式;
  1014. };
  1015. unsafeWindow.更新在控制台使用的脚本变量函数和GM();
  1016. }
  1017.  
  1018. log(
  1019. "[防沉迷减点料] " + 网址 + "\n\n脚本信息: ",
  1020. 脚本信息,
  1021. "\n\n开发者配置: ",
  1022. 开发者配置
  1023. );
  1024.  
  1025. log(
  1026. "[防沉迷减点料] 脚本执行完毕, 用时" +
  1027. (new Date().getTime() - D.getTime()) +
  1028. "ms ",
  1029. 网址
  1030. );
  1031. })();
  1032.  
  1033. addEventListener("load", () => {
  1034. 减点料();
  1035.  
  1036. setTimeout(() => {
  1037. // 以防万一
  1038. qsa("canvas").forEach((element) => {
  1039. element.addEventListener(
  1040. "mousedown",
  1041. function (e) {
  1042. if (GM_getValue("停用快捷键") == "0") {
  1043. if (e.button == 1 && e.shiftKey) {
  1044. 大人来了();
  1045. }
  1046. if (e.button == 1 && e.altKey) {
  1047. 减料成功 = 0;
  1048. 减料();
  1049. }
  1050. }
  1051. },
  1052. true
  1053. );
  1054. });
  1055. }, 5000);
  1056.  
  1057. });
  1058.  
  1059. 减点料();