Research » Browser Extensions » Userscripts
use: Auto Tab Discard
Userscript Manager: Violentmonkey
When it comes to userscript managers, which one should you choose - Violentmonkey, Greasemonkey, or Tampermonkey? The answer is Violentmonkey, as it is a real open-source, cross-browser, and actively developed manager.
Tampermonkey, originally developed for Chrome and then ported to WebExtensions, is closed-source and not to be trusted due to its proprietary license and analytics.
Greasemonkey, also known as the “dad” of script managers, was the original one but is rarely updated now.
FireMonkey is a Firefox-only, closed-source userscript manager that allows you to manage and inject User CSS, so you can ditch Stylus/Stylish altogether.
Learn more about why the three exist: Why the three exist
Userscript Repositories
If you are looking for a fast “meta-search” that searches all of these repositories, try Userscript.Zone.
Greasy Fork is the most popular userscript hoster, it is open-source, hosted on GitHub, and created by the Userstyles.org maintainer.
Although OpenUserJS is an alternative, it has some limits that it constantly displays, and its search feature is painfully slow. However, it has a feature called “Libraries,” which shows which scripts use a library.
An active mirror of the old Userscripts.org Mirror still exists. Additionally, there exists a repository for adult user scripts called Sleazy Fork.
Interesting Userscripts
Take a look at these interesting userscripts:
- adamlui/userscripts is interesting collection of MTurk, ChatGPT and other Greasemonkey userscripts
- qsniyg/maxurl will find larger/original versions of images and videos
- Ibit-to/google-unlocked is to uncensor google search results
- Mottie/GitHub-userscripts collection of Userscripts to improve GitHub functionality
- trim21/webpack-userscript-template is template to build userscript with webpack
Userscript Libraries: Options GUI and Misc
Here are some userscript libraries that you might find helpful:
- sizzlemctwizzle/GM_config is a lightweight, reusable, cross-browser graphical settings framework for inclusion in user scripts.
- AugmentedWeb/UserGui utilizes a simple HTML Form Builder.
- eight04/GM_webextPref is amazing! It allows the use of webext-pref in userscripts.
- CreativeTechGuy/Tooltips: Conflict-free tooltips for injecting into 3rd party websites via UserScripts/Extensions.
- GM.registerMenuCommand is a menu command to the “User Script Commands” submenu, also known as the Monkey Menu.
- GM_createMenu creates a custom menu in the Monkey Menu.
- Entry List is a library for managing pages with many similar items.
- GM_addScript allows the injection of scripts.
- onElement is the smallest script to fire a callback when an element arrives.
- libCtxtMenu is a library for custom context menus.
- pressandhold Library is a very interesting implementation for accented characters.
- RemoveDiacritics library removes accented characters and is essentially the opposite of the previous library.
Notes on Userscripts
You can also store script elements on Pastebin or any other external resources like CSS or similar.
The GM_* API provides essential documentation and, as you can see there, the GM_registerMenuCommand is a component of the system.
Turning Github repos into CDN
I can use any script from GitHub and run it through a CDN, then use it normally in the @require
directive on Userscript.
For example, instead of using a script library from the address https://openuserjs.org/src/libs/sizzle/GM_config.js
, which tends to be slow, I can and do use the url https://cdn.jsdelivr.net/gh/sizzlemctwizzle/GM_config@master/gm_config.js
. I’m getting the latest version and faster CDN with this method.
Sve je objašnjeno zašto i kako u članku on how to use GitHub for Hosting i zašto ne radi direktno na GitHub, a u članku je objašnjen rad sa svim servisima (GitHub Pages, Githack, jJSdelivr)
Najbitniji i najpopularniji je bio RawGit, ali je on prestao sa radom. Trenutno ima samo dva alata za ovu namenu:
raw.githack.com that is based on Free Cloudfare CDN service
jJSdelivr.net To obtain CDN URL, take the required URL from GitHub and use it in this tool: Migrate from GitHub to jsDelivr on the raw file master/gm_config.js
from the repository. When you want to refresh the CDN cache, that is, to “pull” a new version, you can use the tool Purge CDN cache.
Make Your Own Little (Easy-to-Update) CDN - Chris Coyier
šta je ovo?
chat-gpt-voice-recognition-userscript - Source code
html - How to do import/export a class in Vanilla JavaScript (JS) - Stack Overflow
I have discovered that CodeMirror is only initialized when I type ‘.md’ as the extension, which then displays the “Edit” and “Preview” tabs.
textarea - How can I set the value of a CodeMirror editor using Javascript? - Stack Overflow
javascript - Detect changes in the DOM - Stack Overflow
Tampermonkey and React.JS : javascript
Usersctips and Browser Extensions: HN Comments Owl
insin/control-panel-for-twitter: Browser extension which gives you more control over your Twitter timeline and adds missing features and UI improvements - available for desktop and mobile browsers Control Panel for Twitter
alexalbertt/twitter-hider-extension: Hide retweets and threads on Twitter
CSS
Stylebot Stylebot is a browser extension which lets you modify the appearance of any webpage and sync your changes across browsers.
Ali je dobar jer ima editor i readibility. Praktično, pravi bazu za sajtove.
Slično je i Stylus :: add0n.com
Coding userscripts
Injecting CSS
Keyboard shortcuts
- jaywcjlove/hotkeys-js: ➷ A robust Javascript library for capturing keyboard input. It has no dependencies. koji ja koristim
- Violentmonkey with repo violentmonkey/vm-shortcut: Register a shortcut for a function
Svoje scriptove stavi na github, a kao primer: https://github.com/jerone/UserScripts