您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
hide locked problems in LeetCode
当前为
您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
- /* eslint-env greasemonkey, browser */
- // ==UserScript==
- // @name leetcode-hide-locked
- // @namespace weibo.com/flowmemo
- // @version 0.1.1
- // @description hide locked problems in LeetCode
- // @author flowmemo
- // @match https://leetcode.com/problemset/*
- // @grant none
- // @license MIT
- // @supportURL https://github.com/flowmemo/leetcode-hide-locked
- // ==/UserScript==
- ; (function () {
- 'use strict'
- function removeLocked () {
- const locked = document.getElementsByClassName('fa-lock')
- Array.prototype.forEach.call(locked, item => {
- const tr = item.parentElement.parentElement.parentElement
- if (tr.tagName === 'TR') tr.style.display = 'none'
- })
- }
- const problemList = document.querySelector('div[data-reactroot]')
- const observer = new MutationObserver(removeLocked)
- observer.observe(problemList, { childList: true, subtree: true })
- })()