stylus icon indicating copy to clipboard operation
stylus copied to clipboard

feat: add @match directive support

Open bezustally opened this issue 4 months ago • 0 comments

Overview

Adds support for @match directive in usercss files.

Closes #2002

What's Added

  • @match directive support for URL pattern matching
  • Enhanced meta parser to handle @match directives
  • Updated style matcher and usercss compiler for @match compatibility
  • UI improvements to display @match patterns in style management and installation

Usage

@match https://example.com/*
@match https://*.github.com/*

body {
  background: red;
}

Styles with @match directives will now only apply to the specified domains.

UI Changes

  • Enhanced installation UI with favicon display for @match domains image
  • Added display of @match patterns in the style management interface image

Files Changed

  • src/js/meta-parser.js - Added @match parser
  • src/background/style-manager/matcher.js - Enhanced matching
  • src/background/usercss-manager.js - Updated usercss handling
  • src/js/usercss-compiler.js - Added @match compilation
  • src/js/sections-util.js - Better sections processing
  • src/js/prefs.js - Enhanced preferences
  • src/install-usercss/index.js - Added @match support and favicon display
  • src/manage/ files - UI updates and @match display

bezustally avatar Sep 08 '25 10:09 bezustally