Diskuse » Greasy Fork Feedback

@ include - Problem de convertion for CSS to JS ?

§
Posted: 27. 08. 2022

REF:
Help: Prolem with include in my userscript (userstyle)

When i try to instal this userscript(CSS only) as Userscript and not userstyle, the include became :
@ include *
so it applies to all sites, that does not be the case.
Why ?

§
Posted: 27. 08. 2022

The reason is because you have

@namespace url(http://www.w3.org/1999/xhtml);

outside of any @-moz-document, so it wants to apply that globally. I will see if I can fix it, but until then, you can simply remove this declaration.

§
Posted: 28. 08. 2022

Haa ok!
Thanks for the explanation...

§
Posted: 28. 08. 2022

Another same problem with:
X NudeVista - Widescreen Black Them Tweak

It applies to all pages.
And i don't see in it any :
@namespace url(http://www.w3.org/1999/xhtml);

§
Posted: 28. 08. 2022
Edited: 28. 08. 2022

And @include with regexp seems have problem too...
Note
Some userstyles need the :
/* AGENT_SHEET */
@namespace url(http://www.w3.org/1999/xhtml);

to can override the site page

§
Posted: 29. 08. 2022

I've put in a fix that should prevent it from making it global when there's an `@namespace`.

§
Posted: 29. 08. 2022

Another same problem with:
X NudeVista - Widescreen Black Them Tweak

The problem there is due to this code:

/* URL-PREF - URL - NUDEVISTA HOME + SEARCH START */
/* @-moz-document url-prefix("https://www.nudevista.com/")  */

The site is not actually properly parsing CSS - it's just looking for the String @-moz-document, so this comment confuses it. Taking it out should solve the issue.

§
Posted: 29. 08. 2022
Edited: 29. 08. 2022

Tanks a lot for the solution!
Now that's good ....
:-)

But stay pb for regexp ?
By example with (which applies to all sites):
Google Search Expand Options
Haa... sorry, that's the:
@namespace url("http://www.w3.org/1999/xhtml");

But this one have no pb with regexp:
GitHub Red Issues

§
Posted: 29. 08. 2022
But stay pb for regexp ?
By example with (which applies to all sites):
Google Search Expand Options
Haa... sorry, that's the:
@namespace url("http://www.w3.org/1999/xhtml");

This is actually the @charset now. I need to update my fix to handle that as well.

§
Posted: 29. 08. 2022

Ha...
Sorry to give to you more work!

Note, outside the @include pb:
To test how work others Userscripts>CSS,
I had make a advanced search with "regxp" in code .
I wanted filter to see only CSS:
Seems not possible:
Always show the label "JavaScript" highlighting.
And seems not changes the results provided.
Tested without userscripts enable on Waterfox.

§
Posted: 30. 08. 2022

@charset issue is fixed.

§
Posted: 30. 08. 2022

ok

§
Posted: 15. 09. 2022

In an userstyle to style an svg, i need to add (without it i can't style the svg):
@namespace svg "http://www.w3.org/2000/svg";

1 - How to add it with my "normal" name space - @namespace url(http://www.w3.org/1999/xhtml);?

2 - How your wrapper can match "@namespace svg "http://www.w3.org/2000/svg";" ?

§
Posted: 19. 10. 2022

Other problems for these userscripts...(not working with install as userscript but work with Stylus)...

Mine:
Invidious (All Instances) Player And Tabs
Other:
Better Icons for Invidious (My feedback about that)

What's the problem ?

§
Posted: 20. 10. 2022
Invidious (All Instances) Player And Tabs

Generated JS code looks fine to me. Not sure why it wouldn't work.

§
Posted: 21. 10. 2022

The author of "Better Icons for Invidious" say it work with greasemonkey 4.1 (the last updated version of it).
So, maybe it's a problem with greasemonkey 3.17 i use?

§
Posted: 21. 10. 2022

Tested with Tampermonkey:
All is fine.
So the problem is greasemonkey 3.xx version.

Post reply

Sign in to post a reply.