rightsocket

Error messages · Userscript

GM_addStyle is not defined (or another GM_ function)

What you see

ReferenceError: GM_addStyle is not defined

Why it happens

GM_ functions only exist when the script’s header asks for them with @grant. ChatGPT often writes @grant none and then uses GM_addStyle or GM_xmlhttpRequest anyway.

The fix

Sources

Other userscript errors

Adapter for code ChatGPT wrote

Fix it here

Paste every file ChatGPT gave you. You get the refitted userscript and the install steps for your device.

Fits Windows · Mac · Chrome · phone

Check the fit

PlugUserscript

Checked on this page, in your browser. Your code isn’t uploaded or kept.