Greasy Fork is available in English.
以便更快地导航和浏览未完成的学习内容。目前,必须在全部完成之后,方可收起;包括白色任务也得点开。
// ==UserScript== // @name 超星 - 学习进度页面 默认收起已完成章节 // @description 以便更快地导航和浏览未完成的学习内容。目前,必须在全部完成之后,方可收起;包括白色任务也得点开。 // @namespace UnKnown // @author UnKnown // @icon https://imgsrc.baidu.com/forum/pic/item/6a63f6246b600c33c3d714d61c4c510fd9f9a106.jpg // @version 1.0 // @match https://*.chaoxing.com/mycourse/studentcourse // @grant none // @inject-into context // @run-at document-idle // ==/UserScript== document.querySelectorAll('.timeline > .units').forEach( units => Array.from( units.querySelectorAll(':scope .icon > em') ).some( // 如果章节中有未完成的项目,就不收起 em => em.className !== "openlock" ) || (units => { units.querySelectorAll(':scope > .leveltwo').forEach( leveltwo => leveltwo.style.display = "none" ); const i = units.querySelector(':scope > h2 > i'); i && ( i.className = "knowledgeOpenBtn knowledgeCloseBtnImg" ); })(units) );