Discussões » Feedback do Greasy Fork

CSS to UserScript conversion doesn't add @match rules

§
Publicado: 06/12/2022

The vast majority of CSS code on this site and elsewhere doesn't have @match rules in the headers since they already have to use the @-moz-document rule. This means that most UserStyles that GreasyFork converts into UserScripts are showing up globally in people's UserScript extensions. When GreasyFork converts CSS code into a UserScript, it would be very helpful if it could create a @match rule if one doesn't already exist. Or perhaps the uploader could be given a dialog box for adding @match rules when converted. As it is right now, most people use Stylus to write and update their stylesheets, and since its default header doesn't include a @match rule and CSS doesn't require them, the authors will continue to not use them or even know what they are.

§
Publicado: 07/12/2022

Can you provide an example of what you're talking about?

§
Publicado: 09/12/2022

https://greasyfork.org/en/scripts/454513-youtube-search-results-cleaner

Someone posted that I needed to add a @match rule here because my stylesheet is being applied globally for them.

§
Publicado: 09/12/2022

https://greasyfork.org/en/scripts/454080-youtube-show-full-view-count-and-date-unless-hovering

This one as well. Is it happening because I have a separate comment block at the top? I just use Stylus for CSS, so I don't have much experience with this stuff.

§
Publicado: 14/12/2022

The converter didn't support multi-line comments at the top like you had. That's been fixed, and now the JS version of your CSS has @includes.

§
Publicado: 19/12/2022

Thanks, Jason. I really appreciate it, along with everything else you're doing.

Publicar resposta

Faça o login para publicar uma resposta.