UTags Advanced Filter

Real-time filters for list items on any website. Hides items that don't match your criteria, without reloading the page. Supports Greasy Fork and will support more sites via rules.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
Pipecraft
Daily installs
0
Total installs
61
Ratings
1 0 0
Version
0.1.3
Created
2025-11-17
Updated
2026-01-06
Size
188 KB
License
MIT
Applies to

UTags Advanced Filter

English | 中文

A tool that filters and hides list-style content in real time on any website. It is available as both a userscript and a browser extension. Unlike a site's own search or filtering, it hides items directly on the page and supports instant toggling and stacking conditions to view filtered results.

Currently adapted for Greasy Fork script lists. More sites will be supported via a rules system.

screenshots

Key Features

  • Real-time in-page filtering with condition stacking and instant stats.
  • Master switch and safe reset with delayed reveal and second confirmation.
  • Per-site persistent settings; performance cache avoids repeated parsing.
  • Global scoring: a global threshold at the top (default 15). Each filter contributes a score when matched — Keywords (default 5 per item), Updated/Created/Installs (default 20 per category), Authors (per-author score, default 20). With defaults, a single matched non-keyword condition hides immediately; users can lower category or per-author scores so items hide only when multiple conditions are matched together.
  • Negative scores: Keywords and per-author scores can be negative to offset hiding, enabling nuanced combinations.
  • Keyword filter: list management, per-item toggle, editable scores; title/description scope; case sensitivity and regex (/regex/flags); negative scores to offset hiding.
  • Author filter: table management (ID, name) with per-author enable/disable, inline edit, delete, and a dedicated “Add” row; header master checkbox; author picker from the current page.
  • Date filters: Updated and Created (older/recent) with mode (days/months), presets, and custom days.
  • Install counts: hide by total installs and daily installs thresholds.
  • Style isolation via ShadowRoot; unified components (date preset, dropdown).
  • Dark-mode compatibility: the panel and form controls are forced to light scheme for consistent visuals.
  • Debug toggle: a switch next to stats that swaps shown/hidden items to inspect filtered results.

Implemented Features

UI & UX

  • Style isolation: The UI is hosted inside a ShadowRoot to completely avoid CSS pollution from the target website.
  • Floating panel: The filter UI appears as a draggable floating panel fixed to the right side of the page.
  • Collapsible design: The panel collapses into a semi-transparent UTags brand icon and becomes opaque on hover; the collapsed state is persisted.
  • Optimized layout:
    • Two-row structure: The top row contains the title and actions (Reset, Collapse), and the bottom row shows stats and the master switch.
    • Safe reset: The “Reset” button is hidden by default, appears only after hovering for 3 seconds, and shows a second-confirmation dialog before applying, preventing misclicks.
    • Master switch: A main checkbox next to the stats can enable/disable all filters at once and shows an indeterminate state when partially enabled.
    • Quick controls: Unified rows for Updated/Created date filters with enable checkboxes, mode switch (days/months), presets and custom days; the stats on the right update in real time as “Shown X | Hidden X”.
  • Unified components:
    • Date preset component: Date filters (Updated date, Created date) are encapsulated into a reusable createDatePresetInput component, supporting presets like half-year, one year, two years, and custom days.
    • Dropdown menu: Supports closing with Esc, and has its own border and shadow styles.
    • Unified checkbox style: All checkboxes use the utaf-checkbox CSS class to enlarge the hit area.

Filtering — Greasy Fork

  • Updated date: Hide scripts that have not been updated within a specified time (e.g., N days/months/years).
  • Created date:
    • Hide scripts created before a specified date.
    • Hide scripts created within a specified date range.
  • Install counts:
    • Hide scripts with total installs less than N.
    • Hide scripts with daily installs less than N.
  • Keywords:
    • Manage keywords in a list with per-item toggle, edit, delete, and score (default 5).
    • Configure a hide threshold (e.g., 15); when the sum of matched keyword scores in the checked scope ≥ threshold, the script is hidden.
    • Duplicate occurrences of the same keyword are counted once.
    • Scope options: Title only, Description only, Title + Description.
    • Case sensitivity and regex support (use /regex/flags, e.g., /foo/i).
    • Negative scores as offsets: Assign negative scores to “valuable keywords” to reduce the total and avoid hiding. Example: Threshold 4; foo is 5 points and bar is -2 points. When both match, the total is 3 and the item is not hidden; when only foo matches, the total is 5 and the item is hidden.
  • Authors:
    • Author table management: Manage authors (ID, name) in a table with per-author enable/disable, deletion, inline editing of ID/name, and a dedicated “Add” row.
    • Master checkbox: A header master checkbox supports enable-all/disable-all and shows an indeterminate state.
    • Author picker: Collect authors from the current page, with “Select all/none”, “Refresh”, “Add selected”, and “Close” actions to avoid manual typing.
    • Immediate persistence: All author changes are saved instantly and integrated with the live stats updates.
  • Immediate effect: All filter changes take effect instantly and the “shown/hidden” stats update in real time.

Data & State

  • Per-site storage: Filter settings are stored per domain, using the key format utaf_{hostname}_filters, ensuring configurations do not interfere across sites.
  • First-use detection: Using the global state utaf_global_state.isFirstUse, the panel defaults to expanded on first use on any site, and collapses by default afterward.
  • Performance cache: A WeakMap caches parsed metrics for list items (e.g., timestamps, install counts) to avoid repeated DOM queries and parsing during subsequent filtering.

Installation & Usage

Future Plans

  • Rules engine: Abstract a unified site-adaptation interface so that new websites can be adapted via external rule configuration (e.g., JSON) without modifying the main script. Planned rules include:
    • Site detection: Domain and path matching.
    • List item selectors: Define the list container and items.
    • Metric parsers: How to extract updated time, created time, install counts, etc., from items.
  • Adapt more sites:
    • Forums: Discourse, Flarum, etc.
    • Code hosting: GitHub Issues/PRs.
    • Communities: Reddit, V2EX, etc.
  • Feature enhancements:
    • Settings sync: Provide import/export or sync via cloud services.
    • Per-item hide: Add a “Hide” button to each list item, with persistent records.

License

Copyright (c) 2025 Pipecraft. Licensed under the MIT License.