bunp
@bunp

what is userscript?
is it like adding a mod to the website?
ive seen other users post cool userscripts for people to use but i have no clue how to install (?) them


wowperfect
@wowperfect

a userscript is exactly a mod for a website. you essentially add your own code that runs whenever a website loads, and can change functionality of the site.

how to run them: I use tampermonkey which just happens to be the first one that was recommended to me

how to install them:

  1. make sure you trust the userscript. it should be written by someone you trust, or it should be written in pretty readable code so you can make sure they're not making any strange network calls
  2. if they give a link to a ______.user.js file, then you can click on the file and you will be given the choice to install it. this is as simple as clicking "install" and then tampermonkey will check for updates periodically
  3. if they write raw javascript, then copy the JS code, go to the tampermonkey dropdown, click "create a new script", paste the code, save
  4. reload whatever page the script was for, it should work now!

installation screen for tampermonkey hovering over "create a new script"


lexi
@lexi

also, only install userscripts that you trust! you're executing someone else's code after all. treat it like an .exe, if you wouldn't run an exe from the source don't install a userscript from there! and if you're unsure, look it up on google or look if other people trust it, but never blindly install userscripts without checking!


You must log in to comment.

in reply to @bunp's post:

It's basically a two-part process of website mods, yeah. There's the addon that manages and runs the scripts, and there's the scripts themselves.

You can enjoy userscripts by having an addon in your chosen browser specifically for userscripts. In Firefox, I'm running Tampermonkey. I, unfortunately, do not know enough about which versions of the various *monkey userscript addons are good or usable or what. Hopefully other users can inform you more thoroughly on the qualities of various *monkey addons (esp. if not using Firefox.) Tampermonkey hasn't failed me yet as a light user.

You install the addon, then you find the desired userscript, and install that. (Literally just clicking install, or, often, copying the script's URL into your browser. This causes Tampermonkey to pick up that it's a userscript, and redirects me, as such:) Tampermonkey takes me to a secondary page that shows me the full script (so I may inspect it for any suspiciousness), then installs it.

Once I load the webpage that is affected by the userscript, the script runs, altering the page. It has proven exceptionally useful on Cohost, for filtering duplicate chosts, giving me access to 'view source' for chosts, etc. Very good. Hope this has been helpful!

Userscripts are JavaScript that gets ran on a website automatically depending on certain rules. The userscript manager (the thing you need to use them) that I use is called Violentmonkey, it’s a browser extension

installing Userscripts with it is sometimes automatic, other times you need to copy and paste the code into Violentmonkey

If u have any more questions I’m happy to answer :)

in reply to @wowperfect's post:

It is important of course to practice good safety and exercise caution when using a custom script that someone else wrote. Like, who knows what people are capable of with a third party plugin and a userscript, so be sure your password isn't being used on like your banking site for example and if possible look through the code and search/ask folks about anything that looks strange.