https://wiki.greasespot.net/api.php?action=feedcontributions&user=Erikvold&feedformat=atomGreaseSpot Wiki - User contributions [en]2024-03-29T13:22:46ZUser contributionsMediaWiki 1.41.0https://wiki.greasespot.net/index.php?title=Greasemonkey_Manual&diff=5225Greasemonkey Manual2010-05-03T08:48:53Z<p>Erikvold: Undo revision 5224 by 189.114.23.210 (Talk)</p>
<hr />
<div>{{Greasemonkey Manual TOC}}<br />
<br />
== Welcome ==<br />
<br />
Welcome to the [[Greasemonkey]] Manual. This manual is intended to be the authoritative reference for all things [[Greasemonkey]].<br />
<br />
This manual is intended to describe the newest version of the Greasemonkey extension.<br />
If an [[Version_history|older version]] of Greasemonkey is in use, it is recommended to upgrade to the latest, or some of the contents will not make sense.<br />
<br />
It is divided into two main parts. The first is for general users of Greasemonkey;<br />
it covers such topics as installing [[user script]]s and using the features that Greasemonkey provides.<br />
The latter is dedicated to [[user script]] authors and provides information about how to create scripts.<br />
<br />
Navigation to any section directly is provided by using the table of contents at the right.<br />
Or simply start reading at the first chapter: [[Greasemonkey Manual:Installing Scripts|Installing Scripts]].</div>Erikvoldhttps://wiki.greasespot.net/index.php?title=Troubleshooting_(Users)&diff=5184Troubleshooting (Users)2010-04-28T00:35:35Z<p>Erikvold: Undo revision 5181 by 24.12.75.94 (Talk)</p>
<hr />
<div>Much like Firefox allows you to install extensions, Greasemonkey allows you to install user scripts.<br />
If you are having a problem with Greasemonkey, first it is important to check if the problem is actually with the user script, just like a problem with Firefox may actually be caused by an extension.<br />
<br />
These troubleshooting steps may help you fix the problem yourself, and if not they will help you provide information that will be required before anyone else can help you.<br />
If you can't solve your own issues, then please read about [[Greasemonkey Manual:Getting Help|getting help]] from the community.<br />
<br />
== Smaller Problems ==<br />
<br />
=== Greasemonkey Enabled Status ===<br />
<br />
Greasemonkey can be disabled, so that none of its scripts are run.<br />
Check the [[Greasemonkey Manual:Monkey Menu|monkey menu]] icon. If it is displayed in light grey, Greasemonkey is disabled. Click it to re-enable Greasemonkey.<br />
Similarly, you can check the <tt>Tools</tt>, <tt>Greasemonkey</tt>, <tt>Enabled</tt> menu item. Is it checked? If not, check it off and try again.<br />
<br />
=== Script Enabled Status ===<br />
<br />
If you have installed a [user script] and it doesn't seem to work, or it used to work and does no longer, there are a few things to consider.<br />
<br />
# Scripts do not run on every page. Check the [[Greasemonkey Manual:Monkey Menu|monkey menu]] in the status bar. It should list every installed script that runs on the ''current page''. If the script is not listed, it does not run on this page.<br />
# Are you sure it is installed? Open <tt>Tools</tt>, <tt>Greasemonkey</tt>, <tt>Manage User Scripts</tt>. Is the script in the list on the left?<br />
# The script must be ''enabled'' in order to function. Is the script's name greyed out? When you select it in the list, is the ''enabled'' check box below the list checked? If not, check it, and try again.<br />
<br />
=== Script Errors ===<br />
<br />
All scripts running in Firefox (even Firefox itself!) will log errors to the Error Console.<br />
Reading the Error Console can thus be tricky, as it can contain a lot of unrelated information.<br />
Nevertheless, it can be an invaluable diagnostic tool.<br />
<br />
If your problem is of the "when I do this, I expect that, but that doesn't happen" variety, the Error Console may contain some information indicating why.<br />
<br />
# Click <tt>Tools</tt>, <tt>Error Console</tt><br />
# Click <tt>Clear</tt> so that old errors do not get in the way.<br />
# Click <tt>Errors</tt> so that only errors (and not just warnings) are displayed.<br />
<br />
Now load the page, and click the button or link or whatever other action you attempt that doesn't work.<br />
Do new lines show up in the error console?<br />
They may contain the clue needed to figure out what is wrong, and why.<br />
Right click on each and choose <tt>Copy</tt>, so that you can paste the information into an email.<br />
<br />
== Bigger Problems ==<br />
<br />
=== Fresh Profile ===<br />
<br />
==== Creating ====<br />
<br />
Firefox stores all of a user's preferences and settings in a ''profile''.<br />
This includes browsing history, cookies, saved passwords, installed extensions, all settings, and other personalized data.<br />
You can read more about profiles at [http://support.mozilla.com/en-US/kb/Profiles#What_is_a_profile_ Mozilla's support site].<br />
<br />
Unfortunately, sometimes the Firefox profile can become corrupted, causing all kinds of problems.<br />
Also, it's possible for two Firefox extensions to break each other, which is difficult to recognize.<br />
<br />
Thankfully, there is a straightforward way to find out if either of these have happened.<br />
You can create a second fresh profile, run a test in it, and then remove it and switch back to your existing profile with nothing lost.<br />
<br />
You can follow [http://support.mozilla.com/en-US/kb/Managing+profiles Mozilla's "Managing Profiles" instructions], with screenshots and videos.<br />
For clarity, the steps are also explained here<br />
<br />
First:<br />
Start the profile manager.<br />
* For Windows, click <tt>Start</tt>, <tt>Run...</tt> and type: <tt>firefox -profilemanager</tt>, then click OK.<br />
* For Linux and Mac, just type <tt>firefox -profilemanager</tt> at the console.<br />
<br />
Then:<br />
Select <tt>Create Profile...</tt>, click <tt>Next</tt>, and in the box that comes up type a name, like "test". Click Finish.<br />
Select the profile you just created, and select <tt>Start Firefox</tt>.<br />
<br />
After testing is complete, repeat step two, but select the original (probably "default") profile to switch back.<br />
<br />
===== Caveats =====<br />
<br />
The point of creating a fresh profile is for it to be fresh and clean.<br />
Unfortunately, plenty of software injects itself into Firefox globally, and can continue to cause problems even in a fresh profile.<br />
Once you've created and started your fresh profile, open <tt>Tools</tt>, <tt>Add-Ons</tt>, and check if any extensions are listed.<br />
If so, disable all of them and restart Firefox before continuing.<br />
<br />
==== Running ====<br />
<br />
With this fresh profile running, you should see Firefox at it's completely default settings, like after the first time you ran it.<br />
<br />
First:<br />
Install Greasemonkey and restart Firefox.<br />
Open <tt>Tools</tt>, <tt>Error Console</tt>.<br />
Is anything displayed there?<br />
It should be empty.<br />
If not, right-click and copy the text of each, these details can be important.<br />
<br />
Second:<br />
Install user scripts, preferably one at a time, and check after each that everything is working.<br />
If adding one causes a problem, please note which script it was.<br />
<br />
Third:<br />
If you've installed all your scripts, and everything works OK, another extension may be conflicting.<br />
Install all the other extensions you have in your normal profile, one by one, and note which if any causes the problem to return.<br />
<br />
Details of exactly what you noticed, and when, when running through the steps above are invaluable for anyone else to help you.<br />
Take them with you as you try [[Welcome#Getting_Help|getting help]].</div>Erikvoldhttps://wiki.greasespot.net/index.php?title=Greasemonkey_Manual:Installing_Scripts&diff=5147Greasemonkey Manual:Installing Scripts2010-04-19T23:40:12Z<p>Erikvold: Undo revision 5146 by 69.68.25.20 (Talk)</p>
<hr />
<div>{{Greasemonkey Manual TOC}}<br />
<br />
== About User Scripts ==<br />
<br />
The purpose of [[Greasemonkey]] is to manage user scripts.<br />
[[User script]]s allow the ''user'' to control the way they use the web, by customizing it with scripting.<br />
The [https://addons.mozilla.org/firefox/addon/748 Greasemonkey extension] won't do any good without any scripts installed.<br />
<br />
The first thing an eager user should do is find and install ''(or write!)'' a useful script.<br />
<br />
:* A word on finding [[user script]]s. They may be located anywhere on the internet or even offline. The Greasemonkey community typically uses the general purpose user script repository site created for it at [http://userscripts.org/ http://userscripts.org].<br />
<br />
Installation of a script is most often done by clicking a link on a web page. One may also drag-and-drop a local file into the browser window, or optionally use the menu bar [http://support.mozilla.com/en-US/kb/Menu+Reference#Open_File_ File &rarr; Open File...] dialog to open it.<br />
<br />
:* Any file that ends in '''<code>.user.js</code>''' is a valid Greasemonkey user script.<br />
<br />
When the URL of a link is clicked or otherwise navigated to ends with <code>.user.js</code>, [[Greasemonkey]] will intercept the loading file by presenting the installation dialog.<br />
<br />
== The Installation Dialog ==<br />
<br />
When navigating to a [[user script]], Greasemonkey will open its installation dialog instead of loading the script like a normal page.<br />
A thumbnail of this dialog is shown to the left.<br />
It displays the name and description of the script, if available, as well as the [[include and exclude rules]] that apply.<br />
<br />
[[Image:Install-dialog.png|left|thumb|150px|GM Installation Dialog]]<br />
<br />
;* The Install button<br />
This button will, of course, install the script in question.<br />
Like the Firefox extension installation dialog, this button is disabled for a few seconds to avoid the same potential [http://www.squarefree.com/2004/07/01/race-conditions-in-security-dialogs security vulnerability].<br />
<br />
;* The Cancel button<br />
This button will cancel the installation of a script.<br />
<br />
;* The View Script Source button<br />
This button will allow viewing of the source code contained in the script.<br />
At this point, [[Greasemonkey]] has already downloaded the [[user script]] in question to display the name and other details.<br />
<br />
When a user shows the script source, it displays the temporary file that Greasemonkey has already downloaded depicted in this [[:media:View-source.png|screenshot]]. This is intentionally engineered to avoid a potential security problem. An evil server could deliver one innocent script for viewing, and on the second load an evil script for installing.<br />
This approach ensures that the script is downloaded only once. Upon examination of the visible script source, ''this copy'' is the script that will be installed.<br />
<br />
Finally, in this window there is an information bar at the top similar to the Firefox extension installation security warning. This bar includes another Install button much like the the prior dialog. Clicking this button will also install the script. Using the [[Greasemonkey_Manual:Manage_Dialog|Manage Dialog]] is the next step.</div>Erikvold