Jeff Johnson
unread,Apr 6, 2024, 10:13:33 AM4/6/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
I've mostly migrated my MV2 extension to MV3, but there's one feature that I'm finding it impossible to migrate: the ability to inject user-defined HTML script elements into the web page. Looking at the new UserScripts API, the fundamental problem is that the URL matching rules seem very limited and don't fit with the URL matching algorithm of my own extension. Is there any way to get regex support? The "matches", "excludeMatches", "includeGlobs", and "excludeGlobs" keys seem quite primitive and arbitrarily limited.
My extension has always checked the URL at page load time and has a "best match" algorithm, which is a poor fit for UserScripts static rules. Even if I could use regex, which as far as I can tell isn't possible, I would have to add a bunch of "excludes" to every user script rule to handle possible overlaps of the user settings, which is awkward, overly complex, and possibly slow.