Greasy Fork is available in English.
站点优化
当前为
// ==UserScript==
// @name 自用:代码随想录站点优化
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 站点优化
// @author You
// @match https://programmercarl.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=programmercarl.com
// @grant none
// ==/UserScript==
// Get all elements with the class "option-box"
const optionBoxes = document.querySelectorAll('.option-box');
// Loop through the elements and remove them, except the one with the text "侧边栏"
optionBoxes.forEach((optionBox) => {
const text = optionBox.textContent.trim();
if (text !== "侧边栏") {
optionBox.remove();
}
});