Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65484

greasemonkey user scripts @include should support regular expressions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.9.3, 5.10.0
    • WebEngine
    • None
    • c8bb939e7e45214f17daf8f576582e5bff2527ea

      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++.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            toofar toofar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes