Bug 466532 - Greasemonkey match does not support regex (invalid)
Summary: Greasemonkey match does not support regex (invalid)
Status: RESOLVED NOT A BUG
Alias: None
Product: Falkon
Classification: Applications
Component: extensions (show other bugs)
Version: 22.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 15:16 UTC by Schimon Jehudah
Modified: 2024-10-11 13:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Schimon Jehudah 2023-02-27 15:16:07 UTC
The following match rules work with the Greasemonkey web extension but not with Greasemonkey for Falkon.
// @match       *://SOMESITE.(co.uk|com|de|fr|it)/*
// @match       *://*.SOMESITE.(co.uk|com|de|fr|it)/*

Of course, the include metablock does it successfully and more simply with:
// @include     *://SOMESITE.*/*
// @include     *://*.SOMESITE.*/*
Comment 1 Juraj 2024-10-10 18:59:23 UTC
Hello,

The @match meta-thing is handled by QtWebEngine script module.

The QWebEngineScript follows the GreaseMonkey specification which follows Google Chrome specification.
There is not a mention of regex support in the @match attribute.

Based on the links for:
Qt documentation
https://doc.qt.io/qt-6/qwebenginescript.html#details
Greasemonkey wiki (linked from above):
https://wiki.greasespot.net/Metadata_Block#@match
Google Chrome documentation for developers (linked from above):
https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns
Comment 2 Schimon Jehudah 2024-10-11 13:41:22 UTC
I much appreciate your explanation and elaborated respond!