Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.45 KB

File metadata and controls

37 lines (25 loc) · 1.45 KB

GiteeOptimizer

Single-file uBlock Origin filter list that removes distracting elements from Gitee.

Repo layout

.gitattributes    rule.txt → linguist-language=AdBlock (GitHub syntax highlight)
README.md         usage instructions
rule.txt          the actual filter list — edit this to add/remove rules

rule.txt is the only deliverable. Everything else is documentation.

How to use

Open uBO Dashboard → "My filters" → paste rule.txt content → Apply changes.

How the filters work

  • Dual-cover nav: Gitee has two nav systems (new Next.js + old Semantic UI). Most nav items need two rules: one li:has(...) for new, one .header-menu > a or a#id for old.
  • Backslash escaping: uBO needs \: for Tailwind responsive prefixes (e.g. xl\:hidden), and \[...\] for attribute-like classes (e.g. leading-\[26px\]).
  • :has() support: Used for new nav (li:has(a[href="..."])), only available in Chromium 105+ / Firefox 121+.

Maintenance

  • Gitee frequently changes CSS class names (Tailwind + CSS modules).
  • When a rule breaks, open uBO Picker, re-select the element, and replace the broken selector.
  • If Gitee adds a new nav item, follow the dual-cover pattern.
  • Version in rule.txt header follows YYYYMMDD format.

Quick reference

File Purpose
rule.txt AdBlock Plus 2.0 filter list (22 rules)
.gitattributes Linguist override so GitHub highlights rule.txt as AdBlock