Remember userscripts? These little scripts are a useful alternative to browser extensions. They can be used for lots of things, most often for changing something on websites, like removing elements.
Brave Software announced support for scriplets in the company’s Brave Browser today. These work similarly to userscripts. Users of the browser may add scriptlets to Brave so that they run on selected sites automatically.
The new feature has landed in Brave 1.75, the current stable version of the browser.
Good to known: the process is fiddly right now. You need to enable developer mode, add the scriptlets yourself, and assign websites to these scriplets using custom filters.
Here is how it works in detail:
- Load the Content Filters section of the settings. The easiest option is to load this URL: brave://settings/shields/filters
- Toggle Developer Mode to turn it on.
- Activate the “add new scriplet” button on the same page after enabling developer mode.
- Type a name for the scriptlet. You may want to avoid spaces.
- Type or paste the code of the script.
- Select the Save button.
- Now use the following syntax to assign the scriptlet to specific websites: example.com##+js(name-of-your-scriptlet.js)
- Select the save changes button.
Notes:
- Replace example.com with the hostname of the website, e.g., chipp.in.
- Replace name-of-your-scriptlet.js with the name that you have specified during creation.
Brave will execute the script whenever the matching domain is visited.
You can check out the technical documentation of the feature here.
Userscripts or Scriptlets?
Userscript extensions offer some advantages. They may load userscripts easily from various sources, and they may also update them. They also work in all browsers, which is great if you use multiple browsers.
Brave’s solution supports pasting scripts, but it is still fiddly to link them to specific sites and maintain them.
With that said, it may be interesting to advanced users who prefer to avoid extensions whenever possible.
I cannot really say how Brave’s integrated solution compares to userscripts. It is more powerful, equally powerful, or less?
What is your take on the integration? Good move by Brave?
Pointless dribble for those who have nothing more productive to do than entertain the idea that they have complete control over a web designer’s painstaking efforts to provide the best possible experience for visitors.
Quick search term: “how to prevent others from running scripts on your site”
So, I add some code and defeat the idiotic attempts.
You know, if someone doesn’t like something on a site, whatever it may be, don’t go there. Easy enough. Information abounds. It reminds me of the students who used to always be looking for ways to download music off the school server–years ago mentality.
Not every web designer has your interest in mind.
For example, I use scripts on google.com (my backup search engine) to see advanced filters and remove link tracking. I also redirect with scripts webpages on Instagram and Medium to open servers that are way more convenient to use. Few scripts to unblock paywalls. Few scripts to auto click age verifications prompts. Two scripts to track Amazon prices and see country of product seller. One script to remove annoyances in Yahoo Mail. And so on. “Pointless dribble”, I think not.
“Brave’s solution supports pasting scripts, but it is still fiddly to link them to specific sites and maintain them.”
You can do the same thing with userscripts. You have to disable Auto Update checkmark for the script. File becomes editable. Then you set the website you want to use it on with
// @match https://*.example.com/*
// @match https://*.example.co.uk/* or whatever website name and country extension.
Remove these lines
// @downloadURL
// @updateURL
and any other // @match lines that you are not going to use.
And change the script’s name to whatever you like.
Now you are managing/editing the script and assigning it to run on only websites you want.
Userscripts are alive and well.
https://greasyfork.org/sr
https://www.userscript.zone/
That said, I don’t actually use them anymore myself.