Reddit Content Filter

Hide posts and comments containing specified keywords on Reddit

От 11.11.2024. Виж последната версия.

Има други версии на този скрипт, където кодът е обновен. Покажи всички версии.

  • v3.0 11.07.2025

    -Revised blocking logic
    -The userscript will now let you see which posts were hidden and what filter word triggered the removal

  • v2.10 11.07.2025
  • v2.9 11.07.2025
  • v2.8 08.03.2025

    Updated code to handle old.reddit.com

  • v2.7 02.02.2025

    Whitelist feature added

  • v2.6 28.01.2025

    Bugfix

  • v2.5 21.01.2025

    1. Batch Processing: Posts are processed in batches using requestIdleCallback.
    2. Debounced Updates: MutationObserver events are debounced to reduce redundant processing.
    3. Optimized Blocklist: A Set is used for blocklistSet for faster lookups.
    4. CSS Injection: Styles are injected only once.
    5. Error Handling: Added error handling for GM.getValue and GM.setValue.
    6. Code Modularization: Split logic into smaller, reusable functions like hidePost and processPostsBatch.
    7. Modern JavaScript: Used let, const, optional chaining (?.), and nullish coalescing (??)

  • v2.4 14.12.2024

    Updated the description

  • v2.3 10.12.2024

    Counter Updates

    -Removed requestAnimationFrame wrapper around counter updates
    -Moved counter increment outside async operations
    -Added requestIdleCallback for non-blocking updates
    -Implemented batch processing with 16ms debounce timer

    Performance Improvements

    -Increased batch size from 5 to 10 posts
    -Added pending updates tracking
    -Implemented periodic cleanup of counter updates
    -Aligned updates with browser refresh rate

    These changes make the filtered post counter more responsive and reduce UI freezing when processing large numbers of posts

  • v2.2 10.12.2024

    Optimizations

  • v2.1 08.12.2024

    Optimized for Firefox-based browsers (which shouldn't affect Chromium-based browsers)

  • v2.0 06.12.2024

    I renamed the userscript to better-reflect its functionality and added the ability to filter specific subreddits out of the feeds such as r/all

  • v1.9 01.12.2024

    1. Enhanced Keyword Matching: The script now automatically filters out common plural forms of your specified keywords

    2. Updated configuration menu

    3. Updated userscript icon

  • v1.7 01.12.2024

    Bugfix

  • v1.6 01.12.2024

    1. Performance Optimizations:
    - Added cached selectors (POST_SELECTORS and CONTENT_SELECTORS) to reduce repeated DOM queries
    - Implemented debouncing for post processing to prevent excessive function calls
    - Added a process queue system using requestIdleCallback for better CPU utilization

    2. Preloading Feature:
    - Added preloadPosts() function to fetch and parse the next page of content before it's needed
    - Implemented error handling for the preloading functionality

    3. Memory Management:
    - Added a cleanup interval that removes references to posts no longer in the DOM
    - Improved the WeakSet implementation for better garbage collection

    4. Code Structure:
    - Reorganized the code into more logical sections
    - Added better error handling throughout the script
    - Improved the initialization process with better state management

  • v1.4 24.11.2024

    Added @icon to the userscript

  • v1.3 13.11.2024

    Changed the name

  • v1.2 11.11.2024

    Optamized the blocking logic and fixed the Configure button

  • v1.0 10.11.2024