雨课堂显示PPT-去掉"当前页面有动画"提示

自动移除"当前页面有动画,请听老师讲解"的遮罩(在雨课堂上课界面右上角也添加了按钮,也可手动点击)

  1. // ==UserScript==
  2. // @name 雨课堂显示PPT-去掉"当前页面有动画"提示
  3. // @namespace https://github.com/hui-shao
  4. // @homepage https://gf.qytechs.cn/zh-CN/scripts/447478
  5. // @homepageURL https://gf.qytechs.cn/zh-CN/scripts/447478
  6. // @license GPLv3
  7. // @version 0.3
  8. // @description 自动移除"当前页面有动画,请听老师讲解"的遮罩(在雨课堂上课界面右上角也添加了按钮,也可手动点击)
  9. // @author hui-shao
  10. // @match https://*.yuketang.cn/lesson/fullscreen/v*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=yuketang.cn
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. // Your code here...
  19. function createButton() {
  20. //alert("btn");
  21. var button = document.createElement("button");
  22. button.id = "btn001";
  23. button.textContent = "移除";
  24. button.style.color = "black";
  25. button.style.width = "100px";
  26. button.style.height = "80%";
  27. button.style.align = "center";
  28. button.style.marginTop = "0.2%";
  29. button.style.marginRight = "1.5%";
  30. document.querySelector(".lesson__header").appendChild(button);
  31. button.onclick = function () {
  32. console.log("[Script] Pressed the button.");
  33. myRemove();
  34. };
  35. }
  36.  
  37. function myRemove() {
  38. console.log("[Script] Tried to remove.");
  39. document.querySelector(".slide__cmp").style.display="";
  40. document.querySelector(".ppt__modal.box-center").style.display="none";
  41. }
  42.  
  43. document.onreadystatechange = ()=>{
  44. if(document.readyState == "complete") {
  45. console.log("[Script] Tried to Create Btn");
  46. createButton();
  47.  
  48. const targetNode = document.querySelector(".slide__wrap.box-center");
  49. const config = { attributes: true, childList: true, subtree: true };
  50. const callback = function(mutationsList, observer) {
  51. // Use traditional 'for loops' for IE 11
  52. for(let mutation of mutationsList) {
  53. if (mutation.type === 'childList') {
  54. console.log('[Script] A child node has been added or removed.');
  55. }
  56. else if (mutation.type === 'attributes') {
  57. console.log('[Script] The ' + mutation.attributeName + ' attribute was modified.');
  58. }
  59. }
  60. myRemove(); // Auto Remove when DOM changes
  61. };
  62.  
  63. const observer = new MutationObserver(callback);
  64. observer.observe(targetNode, config);
  65. }
  66. };
  67.  
  68. })();

QingJ © 2025

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