leetCode过滤器

LeetCode过滤器,过滤掉问题列表中的锁定的题目

Stan na 05-08-2019. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         leetCode过滤器
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  LeetCode过滤器,过滤掉问题列表中的锁定的题目
// @author       [email protected]
// @match        https://leetcode-cn.com/problemset/all/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let func = window.onload ;
    window.onload = ()=>{
        func && func();
        let observer = new MutationObserver((a,b)=>{
            Array.from(document.getElementsByTagName("tr"))
                .filter(item=>item.querySelectorAll("div>span>span").length>0)
                .forEach(item=>{item.style.display='none'});
        });
        let tb = document.querySelector(".category-group-base+div")
        let options = {
            'childList': true,
            "subtree":true,
        } ;
        observer.observe(tb, options);
    }
})();