-
-
Notifications
You must be signed in to change notification settings - Fork 709
userscripts
User scripts allow you to modify webpages and add features to Min by creating snippets of JavaScript that will run after a page loads or that can be run on command.
To create a userscript, go to Min's Preferences, check "Enable User Scripts", then click "Show script directory". Depending on your operating system, this will open one of the following folders:
-
~/Library/Application Support/Min/userscripts
on macOS -
%AppData%\Min\Userscripts
on Windows (which opensC:\Users\username\AppData\Roaming
) -
/home/username/.config/Min/userscripts
on Linux.
Next, create a new file inside this folder for your script, called whatever you'd like. At the top of your file, you'll need to add a header specifying when and where your script should run. The basic header template looks like this:
// ==UserScript==
// @name Example Script
// @match *
// @exclude example.com
// @run-at document-start
// ==/UserScript==
You can include as many match
or exclude
rules as you want, and your script will run on every page that matches and isn't excluded. These rules also support wildcards, such as *.google.com
.
If you want to choose when to run your script instead, you can specify @run-at context-menu
, and an item will be added to the context menu to run your script. Scripts can also be run from the searchbar by typing !run
and then searching for the name of your script.
Scripts must be saved as a .js
file (for example, my-script.js
). If you are on Windows, make sure to turn on file name extensions to see the full file name.
Once you've saved your script, the updated script will run the next time you reload a tab or navigate to a new page.
- Add vim-style keybindings: https://github.com/PalmerAL/min-vim-mode
- Automatically refresh a webpage: https://github.com/h0ek/Min-WebBrowser-Autorefresh
- Display any website using a dark theme: https://github.com/PalmerAL/min-dark-mode-userscript
- Show a tooltip when hovering over a link: https://github.com/PalmerAL/min-link-tooltip-userscript
- Block YouTube elements (like the Comments, Feed, etc.): https://github.com/Syndamia/min-youtube-element-blocker
- Get emojis with a right click: https://gist.github.com/manoger/fca7c36b0a87875a8377d37c3f4fe830
- Pretty Print raw JSON response: https://gist.github.com/CoderPrans/4fef0ec7fec3935533d4ce567d9a5819
- Custom CSS and Overlay Scrollbars scrollbars: https://github.com/ivancizik/min-css-scrollbar-userscript
- Redirect websites to their privacy-supporting mirrors (YouTube/invidio, Twitter/nitter, etc): min-browser-freestance
- Generate timestamped full page screenshot of a webpage: min-browser-full-screenshot
- Turn all web pages greyscale: https://gist.github.com/flber/a742a82ef0daba77c04b058bab1bb52f
- Easily post to the Pinboard bookmarking service: https://github.com/incanus/min-post-to-pinboard
- Mail current tab URL & title in your desktop mail client: https://github.com/incanus/min-mail-current-page
- A collection of userscripts: https://github.com/Sestowner/min-userscripts
- Translate selected text with DeepL: https://github.com/xpmn/min-userscripts/blob/main/To-DeepL.js
- Create new bookmark in linkding bookmark service from context menu: https://github.com/weases/min-userscripts/blob/main/CreateBookmarkInLinkding.js
- Integrate Keepa price tracker on amazon product pages: https://github.com/weases/min-userscripts/blob/main/IntegrateKeepaPriceChart.js
- Another collection of userscripts, feel free to contribute too: https://github.com/mblithium/my-min-userscripts-collection
- Use native video controls for YouTube Shorts and Instagram Reels: https://github.com/PalmerAL/min-video-controls-userscript
- Visual Speaker by Yuriy Ku for gutenberg.org books: https://github.com/riyku/userscripts
- Bass boosted (ctrl+b slide bass): https://gist.github.com/alisanoelia/8e14f5e4cb79241d0bf99aeba1708a1e
This article is editable as long as you have a GitHub account - if you have an example of a script that you've made, please upload it to GitHub Gist, and add it here!