您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide the sidebar automatically after the page loaded.
当前为
// ==UserScript== // @name VTC Moodle: Auto-hide Sidebar // @name:zh-TW VTC Moodle:自動隱藏側邊欄 // @description Hide the sidebar automatically after the page loaded. // @description:zh-TW 在頁面載入後自動隱藏側邊欄。 // @icon https://icons.duckduckgo.com/ip3/moodle2526.vtc.edu.hk.ico // @author Jason Kwok // @namespace https://jasonhk.dev/ // @version 1.0.0 // @license MIT // @match https://moodle2526.vtc.edu.hk/* // @run-at document-end // @grant none // ==/UserScript== const body = document.body; const toggle = document.querySelector(".tgsdbb_toggle"); if (toggle) { const interval = setInterval(() => { if (!body.classList.contains("tgsdbb_open")) { clearInterval(interval); return; } toggle.click(); }, 50); }