Tampermonkey - FAQ
Tampermonkey - FAQ
TampermonkeyFAQ
Search
Tampermonkey
by Jan Biniok
Home
FAQ
Documentation
Userscript Sources
Support
Changes
Contribute
About
Forum
This section contains some of the most frequently asked questions. If you miss something, just send me a message.
Content
Q100: How do I install and uninstall Tampermonkey (TM)?
Q101: How do I work with TM?
Q102: How to install new scripts to Tampermonkey?
Q103: Is it possible to overwrite or extend a scripts includes and/or excludes? How
is this working?
Q104: What is the @user-agent tag for and how does it work?
Q105: How can I sync all scripts installed at Tampermonkey to another Chrome
browser?
Q106: How can I export and import my scripts?
Q200: Is it possible to install scripts as native Chrome extension even though
Tampermonkey is installed?
Q201: Is Tampermonkey compatible to NotScripts?
Q202: Tampermonkey missing, there is no icon and no script is running. Where are
my scripts and what happened?
Q203: Tampermonkey extension shows a warning. Why?
Q204: How can I allow Tampermonkey access to local file URIs?
Q205: How do I setup the Native Script Import?
Q206: Tampermonkey tells me that my Chrome profile is broken. What does that
mean?
Q207: My scripts are gone and Tampermonkey moans that Chrome wiped the
extension database. What's going on here?
Q300: Tampermonkey can access every page that I visit! Is TM evil?
Q301: Chrome says "Danger: Malware Ahead!". Is Tampermonkey infected with
Malware?
Q302: How do I setup userscript-triggered downloads?
Q303: Tampermonkey says one of my scripts is blacklisted. Why?
Q401: Tampermonkey slows down my computer. What can I do?
Q402: I want to use an external editor to edit my scripts. How can this be done?
Q403: How do I enable the experimental Javascript feature?
Q404: What is the unsafeWindow retrieval setting and how does it work?
Q405: Tampermonkey seems to run at every page instead of only those where
scripts are supposed to run. Why?
Q500: XYZ is my native language. How can I translate TM to XYZ?
Q501: My native language is already supported and I have no idea how to write
javascripts. How can I support you ?
Q600: Ahhh, someone wants my console output. Where can if find that?
Q700: Tampermonkey reports a problem with Dolphin.
General
Q100: How do I install and uninstall Tampermonkey (TM)?
1/10
10/6/2015
TampermonkeyFAQ
In order to install Tampermonkey take a look at the download page here and click at one of the grey retangles. (
video tutorial)
If you want to uninstall Tampermonkey click at the Chrome menu, click at "Tools" and "Extensions". Then search for the
Tampermonkey entry and press the trash icon. ( video tutorial)
Q101: How do I work with TM?
video tutorial)
The third tab offers script import and export functionality to Zip files and JSON documents.
Q103: Is it possible to overwrite or extend a scripts includes and/or excludes? How is this working?
A103:
Sure, just go to the options page and click at the script's name you want to modify. A new tab is opened that shows the script's
source code. Click at the "settings" tab (1) to get the *cludes editor shown at the image above.
Now you can select i.e. a entry from the "Original includes" section (2) and add them as exclude by clicking at "Add as User
excludes" (3). The entry now appears at the "user excludes" section (5) and the script will not run at this page anymore.
If you want to make a script run at a page it originally shouldn't you have to use the "Original excludes" section (4). Again select a
entry, click a the button bellow the section and the entry will appear at "User includes".
You can also add, edit or remove entries that are manually added by using the buttons (6) below the according User section
("User includes", "User matches" and "User excludes").
If you want to override the orginal includes completely just uncheck the checkbox (7) in front of the according heading. For
http://tampermonkey.net/faq.php
2/10
10/6/2015
TampermonkeyFAQ
If you want to override the orginal includes completely just uncheck the checkbox (7) in front of the according heading. For
example you have to uncheck "Original includes" if you want to disable the directive "htt*://*facebook.com/*".
Q104: What is the @user-agent tag for and how does it work?
A104: Sometimes pages use a string that is sent by your browser to determine the layout or feature set that will be show to you.
For example if you using Chrome on Linux it is almost impossible to sell an item on eBay cause it is not possible to upload
images. So what can TM do for you now?Just install this script that overwrites your user-agent string to look like a Windows
Chrome and everything will be working fine again:
Code:
//==UserScript==
//@nameUA|eBay
//@namespacehttp://ebay.de/
//@version0.1
//@descriptionentersomethinguseful
//@match*://*.ebay.tld/*
//@useragentMozilla/5.0(WindowsNT6.1)AppleWebKit/537.13(KHTML,likeGecko)
Chrome/24.0.1284.0Safari/537.13
//@copyright2011+,You
//==/UserScript==
Note: you can get user-agent strings and test your settings here: http://www.useragentstring.com/ and
http://www.useragentstring.com/pages/useragentstring.php
Q105: How can I sync all scripts installed at Tampermonkey to another Chrome browser?
A105:
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.
Please follow this procedure to enable the sync feature:
First, make sure you're signed in to Chrome at both browser instances
then go to TM's Dashboard/Options page and select the 'Settings' tab
now set the 'Config Mode' to either 'Beginner' or 'Advanced'
search for the 'TESLA' section and select 'Chrome Sync' at the 'Type'
field.
Finally you need to 'Enable TESLA' and press the 'Save' button
Note: Since the amount of data that can be synced is very limited
Tampermonkey needs a publicly accessible URL to sync your scripts to the
other Tampermonkey instances. Therefore only scripts that are downloaded
from a web server or that contain a valid @downloadURL tag are processed.
For that purpose both, the http and https protocol can be used.
Q106: How can I export and import my scripts?
Chrome Extension
Q200: Is it possible to install scripts as native Chrome extension even though Tampermonkey is installed?
A200: Yes it is. If you want to install a script just click at the install link. TM now asks you whether to install the script in TM or
native in Chrome.
http://tampermonkey.net/faq.php
3/10
10/6/2015
TampermonkeyFAQ
A201: Yes it is, but due to the fact that NotScripts destroys the whole javascript environment at the page context you have to
either allow embedded scripts at every page a userscript should run on or add an options to the NotScripts configuration file. This
can be done by simply adding the following code to CHANGE__PASSWORD__HERE.js.
Code:
constBLOCKING_MODE="WHITELIST_ALLOW_TOP_LEVEL"
A202: In order to show native userscripts at the options page Tampermonkey's permissions have changed to include the
"management" permission. Chrome automatically disables extensions that need more permissions after an update, but show a
bar like this:
A203:
TM checks whether HTTP headers like "user-agent" or "referer" can be modified by userscripts. If now another extension like a
user agent spoofer or an script blocker like ScriptNo modifies this request too the warning is displayed. This should not occur that
often when the option "Allow HTTP headers to be modified by scripts" is set to "Yes" (Default) or even never if it is set to "No"
Q204: How can I allow Tampermonkey access to local file URIs?
A204: Local file access can be given to an extension at the extension management page. Go to the settings page
(chrome://settings/) and choose extensions at the left.
Now search for the Tampermonkey entry and enable the "Allow access to file URIs" checkbox. (
http://tampermonkey.net/faq.php
video tutorial)
4/10
10/6/2015
TampermonkeyFAQ
Now search for the Tampermonkey entry and enable the "Allow access to file URIs" checkbox. (
video tutorial)
A205: Tampermonkey can help you to import your previously as an extension installed userscripts. The only things that TM needs
to know is where it should search for the source of that extensions.
The following table will help you to identify your browser profile folder at your operating system. So just open your file manager an
check what path fits for your system!
There are two wildcards that you have to know:
dhdgffkkebhmkfjojejmpbldmpobfkfo
Tampermonkey Beta
gcalenpjmijncebpfijmoaglllgpjagf
mfdhdgbonjidekjkjmjaneanmdmpmidf
Tampermonkey Legacy
dcgolfjdmhddbdbpipnjnakbblbojcnf
/home/<user>/.config/google-chrome1/Default/Extensions/<extension>/
C:\Documents and Settings2\<user>\Local Settings3\Application Data4\Google\Chrome\User Data\Default\Extensions\
<extension>\
C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\Extensions\<extension>\
C:\Users\<user>\AppData\Roaming\Opera Software\Opera Next\Extensions\<extension>\
/Users/<user>/Library/Application Support/Google/Chrome/Default/Extensions/<extension>/
Q206: Tampermonkey tells me that my Chrome profile is broken. What does that mean?
A206:
History
This issue was earlier caused by a bug in Chrome at the chrome.storage API. Chromes internal database at Windows OSes
somehow got corrupted.
Why do I see this warning?
Nowadays the bug should be fixed but some users are still reporting that they (sometimes) see this the "broken profile" message.
Since I do not see the warning myself I can only guess what's going on and I need some help to find the root cause.
How does Tampermonkey detect that the profile is broken?
As already mentioned Tampermonkey is using Chrome's API to store values like the settings and your scripts. That's why it runs a
simple test to detect issues. It stores a value and reads it back. If an error condition is set, the read value differs from the written
one or the whole process hasn't finished within 3 minutes then TM claims that something is wrong.
How can I help?
Some users reported that this can be seen when Chrome was updated, when they move or copy files and others see it all the
time. My first guess was that maybe just the first storage hit fails. In order to workaround this I reworked Tampermonkey Beta to
re-run the test five times before assuming the worst.
http://tampermonkey.net/faq.php
5/10
10/6/2015
TampermonkeyFAQ
If you see this issue or have seen it, then please report the details at the forum. Please include information like:
Can you reproduce this issue with TM Beta?
How often have you seen this issue?
Was Chrome updated recently?
Did you run heavy file operations (copy/move) in parallel?
Does this happen only after or while your OS is still booting?
You just want to get rid of the warning?
right click at the TM icon and choose 'Manage' to open the extensions page (chrome://extensions/).
enable the 'Developer Mode' at the upper right if not already done and
search the page for the Tampermonkey entry
click at the 'background.html' link and
select the 'Console' tab
at the bottom of the window (where the cursor is blinking) insert:
Code:
localStorage.setItem('#brokenprofile','nowarning')
A207: In order to solve the issue described above at Q206 Chrome now tries to automatically correct any corruption by removing
corrupted parts.
Depending on the severity of the corruption it might restore some data, otherwise the database is just empty.
Since this can also affect TM's data it tries to detect this process and notify you of the possible loss of all or some settings and
scripts.
Security
Q300: Tampermonkey can access every page that I visit! Is TM evil?
A300: ...like any other chrome extension that has https and http access!
This includes extensions like AdBlock, NotScripts, Smooth Gestures and due to the fact that it is not displayed explicitly when they
are downloaded, any userscript that is installed as native Chrome extension.
If you're interested in this, you can find the access information a the right column of every extension at the Chrome store by
searching for "This extension can access".
Tampermonkey needs to be able to run at every page, cause I don't know at what pages your userscripts will run and therefore
TM must be able to inject them at every page.
But you're right, userscripts and extensions can harm your privacy and your computer. Nevertheless I think more evil is that
Chrome does not display at what pages a userscript wants to run on when install it is installed as native extension. From this
point of view TM even can bring you some security back, tt least if you believe me, that I'm not interested in any of your data. If
not, you can open the console (Ctrl-Shift-J) and choose the network tab to investigate what network communication is done. :)
Q301: Chrome says "Danger: Malware Ahead!". Is Tampermonkey infected with Malware?
http://tampermonkey.net/faq.php
6/10
10/6/2015
TampermonkeyFAQ
Q301: Chrome says "Danger: Malware Ahead!". Is Tampermonkey infected with Malware?
A301: No, Tampermonkey is not infected. Chrome shows this message because the options page tries to load a favicon from a
page that Google suspects to be evil. So this just means that you have script installed that has such an malicious page in its
@includes and Tampermonkey loads the favicons from there to give you an overview where your scripts will run.
In order to fix this issue:
Click at the image to view full
size
A302:
First, please notice that downloading files to your harddisk may be security relevant!
Malware might have an easy job once it is downloaded. So please make sure that you only allow the download of non-executable
files.
There are a few steps necessary to enable the download feature: (
video tutorial)
A303:
This happens cause you either added the source URL to the Manual Userscript and @require Blacklist or it was added to the list
maintained by me. You can find the list including the reason for blackisting at the GitHub repo.
If you still want the script to run then you can either increase the Severity Level or disable the remote list this way:
Go to the options page
Make sure Config Mode is set to Beginner or higher
Scroll down to the BlackCheck section
Modify the Blacklist Source or Severity Level
Note: If you're a script author and think I made a mistake, then just send me an email or open an issue at GitHub.
Advanced
Q401: Tampermonkey slows down my computer. What can I do?
A401: This is a known issue caused by the iframe support of TM (and by the way Greasemonkey too ;)). In order to avoid TM to
check and most probably run scripts at unwished iframes you can do a lot of different things:
No global includes!!!
Try not to use scripts that @include all pages (http://* and https://*) cause these scripts will run at every tab, every frame
and every advertisement.
Note: Tampermonkey outlines such scripts by this icon at their sites column.
Make TM not run at social buttons
Open TM's options page, make sure the Config mode is at least set to Beginner, go to Settings and extend the Blacklisted
http://tampermonkey.net/faq.php
7/10
10/6/2015
TampermonkeyFAQ
Open TM's options page, make sure the Config mode is at least set to Beginner, go to Settings and extend the Blacklisted
Pages text area:
For example by this Facebook exclude regular expression: http://userscripts-mirror.org/guides/395
and/or by others like:
*://apis.google.com/_/+1/*button*
*://www.facebook.com/plugins/*
*://platform.twitter.com/widgets/*
Exclude advertisements
You can try your own excludes based on this:
*://*.doubleclick.*/*
*://*advertising*
*://*banner*
Q402: I want to use an external editor to edit my scripts. How can this be done?
A402: Please take a look at the tutorials section to learn how to achieve this: http://forum.tampermonkey.net/viewtopic.php?
p=1832#p1832
Q403: How do I enable the experimental Javascript feature?
Now a page with all experimental Chrome featues is shown - search for 'Javascript'.
Q404: What is the unsafeWindow retrieval setting and how does it work?
A404: The unsafeWindow object allows userscripts to access Javascript objects of the page they're running on. So if you, for
example, play a browser game the userscript may start an action by running a Javascript function automatically that you in
normal have to start by a click at some button.
Unfortunately in Chrome 27 (or to be more accurate: since WebKit 537.35) the common way to retrieve the unsafeWindow is not
working anymore.
But not every userscripts needs this type of interaction, some scripts just inject stylesheets (i.e. the scripts from userstyles.org)
and other add some actions that don't need the page's Javascript (i.e. the Webcomic Reader).
Finally the correct answer of the question, what option should be set for the 'unsafeWindow retrieval method', depends on the
scripts you're using and maybe the pages you're visiting.
After setting the "Config Mode" to "Beginner", you can choose between 4 different options that will be described below.
Native
This is the most secure option. If no unsafeWindow can be retrieved the safe window will be used, but scripts will not be
able to access the page's Javascript objects.
All scripts that are able to run as extension in Chrome will work.
Unsafe
Tampermonkey can inject the scripts into the page context. By doing this they can access anything that the page's
Javascript can access and additionally they have a reference to the GM_* functions.
Before you now say "Good, I'll use this option" - wait!
Although Javascript should be elaborated enough to not leak this powerful GM_* references to the page's functions, I can
not guarantee this. Another downside is, the execution contexts are the same. This can cause i.e. the page's Jquery to be
overwritten by a userscript requiring Jquery too and bad written userscripts may leak global variables and functions to the
http://tampermonkey.net/faq.php
8/10
10/6/2015
TampermonkeyFAQ
page context.
Sandbox
This option runs the execution environment at the page context but wraps the scripts into a separated world so that global
variables and required scripts like JQuery can not break the page. Please note that this is a very new implementation and it
therefore still might contain bugs or trigger issues. Nevertheless, this seems to be the way to go in the future.
If you discover a problem, please file a bug report here.
Auto
'Auto' uses the 'Sandbox' option at the moment.
Q405: Tampermonkey seems to run at every page instead of only those where scripts are supposed to run. Why?
A405: Unfortunately Chrome does not allow code injection into specific frames.
That's why as long as frames should be supported, Tampermonkey needs to be injected into every page. After the injection it asks
the main application if a script is supposed to run at that URL and then unloads itself to free all resources.
You can help to improve this and tell the Chrome developers how important this feature is for you by starring this issue at
Chrome's bug tracker.
Just login with you Google Account and click at the star in front of the issue heading. Thanks.
Support Development
Q500: XYZ is my native language. How can I translate TM to XYZ?
A501: You can use TM and report bugs if you've found one, make a small contribution or give Tampermonkey a 5-star rating here
. Thanks. :)
Debugging
Q600: Ahhh, someone wants my console output. Where can if find that?
A600:
Before getting the output you have to enable debug output.
Just right-click at the Tampermonkey icon, choose Options and set Logging Level to Debug. (
video tutorial)
video tutorial)
http://tampermonkey.net/faq.php
9/10
10/6/2015
TampermonkeyFAQ
A700:
You'll see this message if Tampermonkey detects that its scripts are successfully injected into the page but can't communicate
back to the Tampermonkey add-on. This problem is caused by a Dolphin bug. So if this problem persists, then you might want to
notify them of the problem by sending them a mail to [email protected] with your Android, Dolphin and WebView version.
Possible work-arounds are listed below.
If you're using Android 5.0 or higher then make sure you're using the latest version of the WebView component.
Try to enable Dolphin Jetpack, either it's part of your Dolphin browser itself or you can download it at the Play Store
Use the (outdated) Dolphin test APK provided by the developers. Please use this APK only for testing!
Downgrade your WebView component. You can get different versions from here. Please be careful when installing APKs
from third-party pages.
http://tampermonkey.net/faq.php
10/10