Have you ever wondered if you could load the next page when you reach the end of a web page ? Or maybe add quick links and information from external pages (ex: add the Rotten Tomatoes score and link to the IMDb page of a movie) ?
User scripts can answer all this questions.
Tampermonkey is a userscript manager extension for Android, Chrome, Chromium, Edge, Firefox, Opera, Safari, and other similar web browsers, written by Jan Biniok.There are also versions for Android, Chrome, Chromium, Firefox, Opera, and Safari. Installing Tampermonkey. To get userscripts going with the Edge version of Tampermonkey, first you have to install it from the.
Tampermonkey is a free browser extension and the most popular userscript manager. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox. Pc hd video song download. Even though some of the supported browsers have native userscript support, Tampermonkey will give you much more convenience in managing your userscripts. It provides features like easy script installation, automatic update checks, a. Jul 26, 2019. Note: In order to install the extension you need to drag and drop the downloaded file in the Extensions tab. Download and install Tampermonkey safely and without concerns. Tampermonkey is a software product developed by Tampermonkey and it is listed in Tweak category under Chrome Add-ons. This Tampermonkey Browser Extension End-User License Agreement (“EULA” or “Agreement”) is a legal agreement between you, and Jan Biniok (the “Company”), which is the legal owner of the Tampermonkey browser extension (“Tampermonkey” or “Tampermonkey browser extension”), and provides the terms and conditions by which you may.
Keygen on mac sierra. A user script is a set of JavaScript code and metadata that is executed when a web page is loading:
- The code is a sequence of instructions that tells the browser how to modify the page.
- The metadata are information about the user script, for example: the web pages where they should run, the resources and libraries they require, and more.
In order to add, update and manage user scripts, a userscript manager must be installed.
Technically, a user script is just a text file that ends with
.user.js
. This fact allows userscript managers to detect and install user scripts when a file is opened in the browser.Installing a userscript manager
From my experience, Tampermonkey is best suited for Chromium-based browsers such as Google Chrome and Opera.
Tampermonkey File Script
Violentmonkey is currently the best supported userscript manager for Firefox.
Tampermonkey
With more than 10 million users, Tampermonkey is the leading userscript manager. It's also available in all the major navigators.
Here are the direct pages where you can install the Tampermonkey extension:
- Google Chrome: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
- Opera: https://addons.opera.com/en/extensions/details/tampermonkey-beta/
- Microsoft Edge: https://www.microsoft.com/store/apps/9NBLGGH5162S
- Safari: https://safari-extensions.apple.com/details/?id=net.tampermonkey.safari-G3XV72R5TC
More detailed instructions to install Tampermonkey and a comprehensive features overview is presented in the following links: Google Chrome, Opera, Microsoft Edge, Safari.
Violentmonkey
Violentmonkey is the main alternative to Tampermonkey, and is completely open source. It's available in Firefox, Chrome, Opera and Maxthon.
The following page lists the download links for the different supported browsers: https://violentmonkey.github.io/get-it/
Greasemonkey
Greasemonkey is the original userscript manager. Following Firefox 57, and starting from the version Greasemonkey 4, the extension changed its API to be compatible with the Browser Extension API, and no longer support scripts written using the older
GM_
synchronous API (more explanations can be found in this blog post).I discourage using it at the moment because the majority of user scripts are written using the older API and the other userscript managers don't support the new asynchronous API.
You will have to install it only if a user script you want to add is written specifically using the new
GM.
asynchronous API and doesn't have a polyfill to support the older API (very rarely).Searching for user scripts
The majority of user scripts are hosted either on openuserjs.org or greasyfork.org.
OpenUserJS
The following example illustrates how to search for a user script on OpenUserJS and install it on Google Chrome with Tampermonkey:
- Navigate to the home page
- Enter the keywords into the
Search Userscripts
text input: can be the target website name, the desired feature, etc. For example, let's search for a Google user script - Open the script page you want to install, for example
Endless Google
- If the script's description is corresponding to the features you are searching for, install the script by clicking the
Install
button - Confirm the installation by clicking
Install
- The user script can now be tested by opening or reloading the target website
GreasyFork
Firefox with Violentmonkey is used in the next steps:
- Navigate to the Scripts page
- Enter the keywords into the
Search scripts
text input: can be the target website name, the desired feature, etc. For example, let's search for a Feedly user script - Open the script page you want to install, for example
Feedly filtering and sorting
- If the script's description is corresponding to the features you are searching for, install the script by clicking the
Install this script
button - Confirm the installation
- The user script can now be tested by opening or reloading the target website
Alternatives
- Userscripts.org used to be the leading user script repository. But the website was shut down in 2014, and a mirror web page was launched to host all it's original user scripts: userscripts-mirror.org
- There are some user scripts that are hosted on personal or github pages, a general search engine such as Google can be used in this case to search for them.
Using user scripts
A user script can be configured and interacted with in different ways after installing it:
- Some user scripts will indicate in their description or documentation page that they will add a button to a specific part of the page to open a settings menu or execute another action
- They can also register commands and/or shortcuts in the userscript manager to open the setting menu or to execute another action on the current page
- Others won't need any configuration and will work as is
The userscript manager can also be used to configure security, storage and other script specific settings such as the pages where the script should run as presented in the following section.
Includes and Excludes
The includes/matches are the web pages where the script will run (@include supports regular expressions and @match is safer). The excludes are the pages where the script shouldn't run.
Even though the user script already defines includes and excludes in its metadata, they can be overwritten using the userscript manager.
Tampermonkey
- Open the Dashboard by clicking on the Tampermonkey button and selecting
Dashboard
- Click on the user script you want to configure
- Switch to the
Settings
tab. You can now add additional includes, matches and excludes. You can also disable the original includes and excludes
Violentmonkey
- Open the Dashboard by clicking on the Violentmonkey button and selecting
Open Dashboard
- Click on the edit button next to the user script you want to configure
- Switch to the
Settings
tab. You can now add additional includes, matches and excludes. You can also disable the original includes and excludes
User script examples
Tampermonkey Crx4chrome
Here is a list of the user scripts demonstrated in this guide in addition to others that I personally find very useful:
- Endless Google: Load more results automatically and append them to the end of the current Google results page
- Show Rottentomatoes meter: Show the Rotten Tomatoes score on imdb.com and other websites
- Feedly filtering and sorting: Enhance the feedly website with advanced keyword filtering and restricting, sorting, duplicates checking, coloring rules and more
- YouTube + or Iridium: Provides multiple enhancements to YouTube, my favorite being the always visible player feature that detaches the player and makes it movable when you scroll down to read the comments
- Anti-Adblock Killer | Reek: If you are using an adblocker, some websites won't let you continue using them until you disable it. This script will prevent these websites from detecting you are using an adblocker
- W.A.R. Links Checker Premium: Automatically checks links from hundreds of file hosts such as Google Drive and Rapidgator, and display the file size in a pop up when hovering over the links (when possible)
Writing your own scripts
Prerequisites
Basic HTML knowledge is required. Get started with HTML.
Basic CSS knowledge is also needed, especially selectors. Get introduced to CSS selectors.
If you are unfamiliar with JavaScript, I recommend reading the following first steps guides.
If you were already introduced to JavaScript and need a refresher, or you just need a summarized tutorial to quickly learn the language, here is a re-introduction to JavaScript
You can also follow the chapters of this intermediary JavaScript guide, and read this exhaustive JavaScript reference.
Your first user script
As mentioned earlier, a user script is a set of JavaScript code and metadata which are technically just JavaScript comments.
From the userscript manager dashboard, click on the
+
button to create a new user script.Change the name, description and the match pattern to target a specific web page. Replace
// Your code here..
with alert('Hello World !');
Now navigate to your target website or refresh it if it's already open. You should have an alert pop up that displays
Hello World
That's it!
You can now start experimenting with the
GM_*
API to store data for example, or add third-party code libraries (such as JQuery) to help you write less or to reuse existing code.Using the API and adding external libraries
If you want to use the
GM_*
API, you must declare a @grant
header in the metadata followed by the API function name (such as GM_getValue
, GM_setValue
, etc.)A User Script documentation describing the available headers (metadata) and the API (
GM_*
) can be found in the following page. An alternative metadata documentation can be found here.Third-party libraries can be added by defining the
@require
header followed by the library URL. For example:User Script idioms and code snippets
- Query and remove a page element:
- Store an object:
- Retrieve an object:
- Replace the current URL and redirect the page:
- Add a button to execute some function on the page:
- Append a style to the page:
- Fetching and parsing an external page:
Tampermonkey is the most popular userscript manager for Browsers like Google Chrome, Mozilla Firefox, Opera, Safari. Userscripts (sometimes also called Greasemonkey scripts) are little computer programs that for example add a download button to the YouTube page, cleanup your Facebook timeline or help to play an online game. It has built-in editor by that You can create an environment of your own using Tempormonkey. It is an add-on mostly popular in Chrome browser. It is very easy to sync your scripts but there is one limitation: Tampermonkey can only sync scripts that are installed from a remote source. This source can be any URL that is accessible by both of your Chrome browsers. It is relevant mostly for the those who people who like doing something different every time with their browsers.
Tampermonkey is available on:
Platforms:
Google Chrome: It is available in three versions for Chrome.
- Tampermonkey Stable
- Tampermonkey Beta
- Tampermonkey Legacy
Mozilla Firefox: It is available on Firefox with the name of Tampermonkey.
Safari: you can also use this add-on on safari by name of Tampermonkey.
Opera: Available as Tampermonkey.
Microsoft Edge: Available as Tampermonkey for Microsoft Edge.
Dolphin Browser Android: It is available on Android wth Dolphin browser with the name of Tampermonkey Dolphin.
UC browser Android: It is also available on Android UC Browser with the name Tampermonkey UC.
Features of Tampermonkey:
- you can manage and edit your userscripts.
- Easily enable and disable your scripts with 2 clicks.
- This has script synchronization
- You can use this for backup and restore via zip file or cloud storage (Google Drive, Dropbox, OneDrive).
- You will get All GM_* functions including (GM_registerMenuCommand, GM_getResourceText, GM_getResourceURL, GM_notification)
full unsafeWindow access. - Most of the tags supported by Greasemonkey and Scriptish (like @resource, @require, etc….)