LeetCode Minus User

I am not a LeetCode Plus user and I don’t want to see LeetCode member-only problems.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

作者のサイトでサポートを受ける。または、このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         LeetCode Minus User
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  I am not a LeetCode Plus user and I don’t want to see LeetCode member-only problems.
// @author       liuxueyang
// @match        https://leetcode.cn/*
// @match        https://leetcode.com/*
// @license      MIT
// @supportURL   https://github.com/liuxueyang/leetcode-minus-user/issues
// @homepageURL  https://github.com/liuxueyang/leetcode-minus-user
// ==/UserScript==

(function() {
    'use strict';

    function hideLockedProblems() {
        document.querySelectorAll('.fa-lock').forEach(lock => {
            const item = lock.closest('a');
            if (item) {
                item.style.display = 'none';
            }
        });
    }

    hideLockedProblems();

    const observer = new MutationObserver(hideLockedProblems);
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();