LeetCode 問題フィルター&非表示パネル

LeetCodeのフィルターと進捗カードを追加。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
hi4444
1日のインストール数
1
累計インストール数
1
評価
0 0 0
バージョン
1.4
作成日
2026/04/14
更新日
2026/04/15
大きさ
22.8KB
ライセンス
不明
対象サイト

Additional Info — LeetCode Pro Filter Suite (Stable Fix)

This userscript enhances the LeetCode Problemset page by adding a lightweight, client-side filtering system and a live progress dashboard. It is designed to run automatically after installation via Greasy Fork or any userscript manager (Tampermonkey / Violentmonkey).


🧩 What This Script Does

Once installed, the script automatically activates when you open:

https://leetcode.com/problemset/

It then:

  • Injects a custom control panel into the sidebar
  • Scans the problem table in real time
  • Applies user-defined filters instantly
  • Tracks your progress from the visible LeetCode UI
  • Saves all preferences locally in your browser

No setup, configuration, or login is required.


⚙️ Core Functionality (In Detail)

🔍 1. Problem Filtering Engine

The script continuously scans DOM rows representing problems and filters them based on:

  • Difficulty level (Easy / Medium / Hard)
  • Locked problems (premium content)
  • Completed problems (already solved)
  • Daily challenges (optional exclusion)

Filtering happens instantly when:

  • The page loads
  • New problems are dynamically inserted
  • You toggle any filter button

🚫 2. Visibility Control System

Each filter works by applying a hidden CSS class:

  • Problems are NOT deleted
  • They are only hidden using display: none !important
  • This ensures zero interference with LeetCode logic

This makes the system:

  • Safe
  • Reversible
  • Non-destructive

📊 3. Live Progress Dashboard

A circular progress indicator is injected into the sidebar.

It:

  • Reads your solved/total count from the LeetCode UI
  • Parses text dynamically (e.g. 123 / 345)
  • Updates automatically every few seconds
  • Animates a circular SVG progress ring

The progress ring:

  • Fills proportionally to completion percentage
  • Updates without refreshing the page
  • Reflects real-time changes in your account progress

💾 4. Persistent Settings (Local Storage)

All toggles are stored in:

localStorage → lc_pro_suite_settings_v6

This includes:

  • Hidden locked problems setting
  • Hidden completed problems setting
  • Difficulty filters
  • Panel collapse state

Your settings remain saved even after:

  • Refreshing the page
  • Closing the browser
  • Restarting your device

🚀 Performance Design

The script is optimized for speed:

  • Uses a MutationObserver instead of polling
  • Batch-scans DOM updates
  • Avoids unnecessary re-renders
  • Minimizes layout thrashing
  • Prevents duplicate processing of rows

This ensures:

  • Low CPU usage
  • Smooth scrolling
  • No UI lag on large problem lists

🔐 Safety & Privacy

This script:

  • Does NOT send any data externally
  • Does NOT track user activity
  • Does NOT modify LeetCode backend requests
  • Runs entirely in your browser
  • Uses only localStorage for preferences

It is fully offline-safe and privacy-respecting.


🌐 Browser Compatibility

Works with:

  • Desktop Chrome
  • Microsoft Edge
  • Firefox
  • Opera GX (fully supported via Tampermonkey)

Note: On Opera GX, install a userscript manager extension first (such as Tampermonkey) to enable script execution. Unsure about Violentmonkey extension


📌 Summary

This script enhances LeetCode by adding:

  • Smart filtering system
  • Live progress visualization
  • Persistent UI customization
  • Lightweight DOM optimization

All without changing LeetCode’s core functionality.