Greasy Fork镜像 支持简体中文。

国培网chinahrt.com刷课救星

这是一个能屏蔽国培网chinahrt.com刷课时自动暂停的脚本。

  1. // ==UserScript==
  2. // @name 国培网chinahrt.com刷课救星
  3. // @namespace undefined
  4. // @version 0.1.0
  5. // @description 这是一个能屏蔽国培网chinahrt.com刷课时自动暂停的脚本。
  6. // @author 点灯 diandeng
  7. // @match *://*.chinahrt.com/*
  8. // @icon https://www.chinahrt.com/style/images/logo.png
  9. // @supportURL https://space.bilibili.com/21219957
  10. // @run-at document-start
  11. // ==/UserScript==
  12. (function () {
  13. 'use strict';
  14. //屏蔽失去焦点时自动暂停
  15. window.onfocus = function () {
  16. console.log('on focus')
  17. };
  18. window.onblur = function () {
  19. console.log('on blur')
  20. };
  21. //自动刷课(未启用)
  22. /*
  23. //判断是否在课程列表
  24. if (window.location.href.indexOf("course/preview?") != -1) {
  25. var sections = document.getElementsByClassName("fr menu-zt")
  26. var completed_number = 0
  27. for (var i = 0; i < sections.length; i++) {
  28. if (sections[i].innerText.indexOf("学习中") != -1) {
  29. completed_number++
  30. }
  31. }
  32. document.getElementsByClassName("menu")[0].getElementsByTagName("a")[completed_number - 1].click()
  33. }
  34. */
  35. })();

QingJ © 2025

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