Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.9.3, 5.10.0
-
None
-
c8bb939e7e45214f17daf8f576582e5bff2527ea
Description
Parsing greasemonkey user script metadata block comments for `@include`, `@exclude` and `@match` to support only injecting scripts into the desired pages was added in #9bb9076c50048 by davidsz. It supports wildcard globs for include and exclude directives and the chomium url matcher syntax for match but according to the spec include and exclude directives should additionally support regular expressions when the value starts and ends with a forward slash.
Here is an example of a scripts that uses a regex include: https://raw.githubusercontent.com/StylishThemes/GitHub-Dark-Script/master/github-dark-script.user.js
The spec doesn't say what regex syntax but here is the original support so it looks like ECMAScript which apparently is the default in c++.