Agentmonkey / Learn /
What is a userscript?
A userscript is a small piece of JavaScript that your browser runs on a website to change how the site looks or works. The site does not know about it and nothing changes for other visitors.
What userscripts are used for
- Hiding parts of a page, such as recommendations or sponsored results
- Adding things the site lacks, such as a download or export button
- Changing defaults, such as playback speed or sort order
- Restyling a site, although a user style (CSS only) is often enough for that
What a userscript manager does
Browsers do not run userscripts on their own. A userscript manager is an extension that stores your scripts and runs each one on the sites it is meant for. Greasemonkey was the first; Tampermonkey and Violentmonkey are the most used today.
Where scripts come from
Traditionally you either install a script from a community library such as Greasy Fork, or write one. Both have a cost: a library script is someone else's code running on your pages, and your own script is yours to maintain when the site changes.
A newer option is to have an AI write the script for the page you have open. That is what Agentmonkey does: your AI app reads the page, writes the CSS or JavaScript, and the extension runs it on every visit.
Userscripts in Chrome today
Chrome requires you to switch on Allow User Scripts for any extension that runs your own JavaScript. It is a one-time setting on the extension's details page.
Related
Questions
Are userscripts safe?
A userscript can read and change everything on the pages it runs on, so only run code you trust or can read. Limit each script to the sites it needs.
What is the difference between a userscript and a user style?
A user style is CSS only and changes how a page looks. A userscript is JavaScript and can also change how it behaves.