您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
防止video.js刷新iframe导致内存溢出,增加判断登录(不可用)是否过期。
当前为
// ==UserScript== // @name 华为云课堂防止内存溢出 // @version 2.3.2 // @description 防止video.js刷新iframe导致内存溢出,增加判断登录(不可用)是否过期。 // @author LittleJake // @license Apache2.0 // @match https://education.huaweicloud.com/courses/* // @icon https://www.google.cn/s2/favicons?domain=huaweicloud.com // @grant none // @namespace https://gf.qytechs.cn/users/773473 // ==/UserScript== (function() { 'use strict'; var rm = function(){ //去除iframe if (document.getElementById("testIframe")){ document.getElementById("testIframe").remove(); console.log("rm success."); } //去除水印 $('#watermark').val("False"); }; //处理登录(不可用)失效问题 if ($){ let data_id = $(".vert-0").attr("data-id"), course_id = $(".vert-0").children().attr("data-course-id"); let ajax_url = "https://education.huaweicloud.com/courses/" + course_id + "/xblock/" + data_id + "/handler/save_user_video_time"; if (data_id && course_id){ setInterval(function(){ if ($){ $.ajax({ url: ajax_url, data: '{"msg":0,"type":""}', method: "POST", error: function(e){ console.log(e.status); if (e.status == 403){ window.location = "https://auth.huaweicloud.com/authui/login.html?service="+window.location; $ = null; } }, }); } }, 10000); } window.onload = rm; $("body").on('click', rm); } console.log("===华为云课堂增强脚本==="); console.log("项目地址:https://github.com/LittleJake/education-huawei-memory-leak/"); console.log("by LittleJake, licensed under Apache2.0"); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址