Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.17k stars 416 forks source link

eslint Error "@exclude-match" is not a valid userscript header" still unsupported? #2161

Closed pstein closed 3 weeks ago

pstein commented 3 weeks ago

I imported a couple of Greasemonkey *.user.js scripts from Firefox into Tampermonkey on Chrome.

When I look at them the left of the lines

//@exclude-match ....

a yellow exclamation mark is show with the text:

"@exclude-match" is not a valid userscript header"

So why is @exclude-match still not supported in Tampermonkey? @exclude-match is urgently recommended over @exclude

How can I fix it (for ALL SCRIPTS AT ONCE) in Tampermonkey WebExt on Chrome?

Do I really have to change all *.user scripts manually to @exclude?

derjanb commented 3 weeks ago

Greasemonkey has no @exclude-match support either.

derjanb commented 3 weeks ago

@exclude-match is urgently recommended over @exclude

@pstein Why should a non-standard @exclude-match be preferred over a standard @exclude that is recognized by all userscript managers?

pstein commented 3 weeks ago

@exclude-match is urgently recommended over @exclude

@pstein Why should a non-standard @exclude-match be preferred over a standard @exclude that is recognized by all userscript managers?

Maybe because of this:

https://github.com/quoid/userscripts/issues/650

and this ("all major browsers and script managers support @match"):

https://github.com/quoid/userscripts/issues/649#issuecomment-2085725872

7nik commented 3 weeks ago

Greasemonkey has no @exclude-match support either.

But VM has.

Maybe because of this:

quoid/userscripts#650

Though @exclude-match should be a bit more performant, it doesn't increase security like @match. Plus, @match/@exlude-match is less precise than @include/@exclude due to simple matching patterns. And it doesn't make sense to get rid entirely of @include and @exclude because thousands of userscripts still use them, and nobody will update them, or it's tricky because @match is more coarse.