// ==UserScript== // @name ESJ Zone: Auto Expand Collapsed Chapters // @name:zh-TW ESJ Zone:自動打開摺疊章節 // @name:zh-CN ESJ Zone:自动打开折叠章节 // @description Expand the collapsed, last read chapters automatically. // @description:zh-TW 自動展開已折疊的最後閱讀章節。 // @description:zh-CN 自动展开已折叠的最后阅读章节。 // @icon https://icons.duckduckgo.com/ip3/www.esjzone.cc.ico // @author Jason Kwok // @namespace https://jasonhk.dev/ // @version 1.0.1 // @license MIT // @match https://www.esjzone.cc/detail/*.html // @match https://www.esjzone.me/detail/*.html // @run-at document-end // @grant none // @supportURL https://greasyfork.org/scripts/487306/feedback // @downloadURL none // ==/UserScript== const elements = document.querySelectorAll("#chapterList details"); for (const element of elements) { if (element.querySelector("p.active") !== null) { element.open = true; } }