您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
力扣隐藏会员、面试、竞赛(LCP)、剑指offer(LCR)题
/* eslint-disable no-undef */ // ==UserScript== // @name 力扣隐藏会员、面试、竞赛、剑指offer题 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 力扣隐藏会员、面试、竞赛(LCP)、剑指offer(LCR)题 // @author jzh // @match https://leetcode.cn/problemset/all/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @require http://code.jquery.com/jquery-3.x-git.min.js // @license MIT // ==/UserScript== ;(function () { 'use strict' const button = $('<button id="filter" type="button"></button>').text('筛选') $('.min-w-full').prepend(button) $('#filter').click(function () { const list = document.getElementsByClassName('min-w-full')[0].children[2] for (let i = list.children.length - 1; i >= 0; i--) { const item = list.children[i] if (item.children[0].hasChildNodes()) { item.style.display = 'none' } else { const text = item.children[1].children[0].getElementsByTagName('a')[0].innerText if (text.startsWith('LCR') || text.startsWith('LCP') || text.startsWith('面试题')) { item.style.display = 'none' } } } }) })()