Discussies » Ontwikkeling

How to modify @run-at for automatically converted CSS into userscript?

§
Geplaatst: 19-04-2026

Hi all,

I'm relatively new to actually writing UserScripts. I wrote a dark theme for a site using CSS and Stylus and I uploaded it on here and let GF to automatically convert it into a Userscript. The problem I ran into was how Tampermonkey/Violentmonkey loads scripts. Since the site can have multiple Userscripts running and since some modify colors, they end up modifying colors after my script was loaded and colors don't looks right. It all depends on sequencing and the order in which TM/VM load scripts.

The fix was to change:
// @run-at document-start
to:
// @run-at document-end

And then my script modifies colors last.

However, I have no control over this and I haven't been able to figure out how to tell GF to use "// @run-at document-end" instead.

Does anyone know how to fix this?

Thanks!!

§
Geplaatst: 19-04-2026

There's no way to tell Greasy Fork to use @run-at document-end.

It sounds like you would want to ensure your CSS has a higher specificity so that it always has the highest priority.

Reactie plaatsen

Log in om antwoord te geven.