Questions tagged [greasemonkey]

OBSOLETE as of Firefox 57. Use [greasemonkey-4] or [tampermonkey] as applicable. If using some other browser userscript engine, use [userscripts].

OBSOLETE as of Greasemonkey 4 -- which is a major change that is not backwards compatible.


Usage Hint

Use this tag if you are using Firefox, pre version 57. Use the tag if you are using Tampermonkey on Chrome. For all other userscripts, please use the tag.

GreasemonkeyMain add-on page is a userscript manager for Firefox. Userscripts are written in JavaScript, and run in every page as specified by the @include, @exclude, and @match rules.

Greasemonkey also permits special operations that ordinary javascript is not allowed to do. See the Greasemonkey API.

Userscripts are also available on/for other browsers; see the tag wiki of .
Important: Please use only if you are running the Firefox browser and/or using the add-on.
For all others, use , if it applies, or .


Premade userscripts:

Premade userscripts can be found at:


References:

2842 questions
1
vote
2 answers

Load and parse remote url with greasemonkey

How can I write a Greasemonkey script that will go through a list of URLs (on the same domain) and enable an XPath query to be performed on the resulting DOM? Thanks
Dave
  • 433
  • 1
  • 5
  • 7
1
vote
0 answers

Override javascript parameters on a protected page with Greasemonkey?

I'm trying to enable printing on a page which has disabled printing (and downloading). The code below is made with Flip PDF Professional. At the bottom of the javascript below, I would like to change bookConfig.enablePrint="No"; and…
1
vote
0 answers

How does greasemonkey/tampermonkey run userscripts since eval is not allowed?

I don't understand how is the tampermonkey programmed since it interprets userscripts (written in javascript), but extensions aren't allowed to eval(=run) any scripts (and therefore the userscripts too). Or is the extension having it's own…
Novellizator
  • 13,633
  • 9
  • 43
  • 65
1
vote
1 answer

GM Cross domain Ajax not working

Trying to prepopulate a form on a client's website with data from our database using a greasemonkey script, but i can't figure out how to get around the same origin policy.. I am using GM_xmlhttpRequest nd even specified @grant GM_xmlhttpRequest but…
1
vote
1 answer

Add jQuery tabs with Userscript

I'm using a tampermonkey/Greasemonkey script to add my own userscripts to a webpage, and I am looking to add an extra tab to a settings page. The tabs are originally constructed using jQuery UI tabs (on pageload). The problem I'm having is that when…
Vasu
  • 1,090
  • 3
  • 18
  • 35
1
vote
1 answer

Greasemonkey script blocking other scripts of website

My Greasemonkey script works exactly as I want it to by but it somehow blocks javascripts from the website itself. They just don't work anymore. I use the very useful waitForKeyElements() to start some actions after a certain container has been…
A2i_
  • 398
  • 3
  • 13
1
vote
2 answers

Code works in console/scratchpad but not in a Greasemonkey script?

I'm trying to write a script to make the map larger on Google Flights. I've got the jQuery working in the Firefox scratchpad. This script does exactly what I am trying to accomplish: $('div').filter(function(){ return $(this).css('width') ==…
spazzed
  • 93
  • 2
  • 9
1
vote
1 answer

How to add a button to the Asana task pane

I've noticed that several "featured" Asana apps are integrated into the task pane (just search for "pane" in the app page.) For example, here's the Harvest button, once you enable their "app": I'd like to do the same for my own extension. Is there…
Tobia
  • 17,856
  • 6
  • 74
  • 93
1
vote
1 answer

Problems converting html contents to integer and then sorting in jquery

I've created a very simple greasemonkey script based on Jquery - sort DIV's by innerHTML of children to add buttons to the results panel on www.oldmapsonline.org to enable sorting by date and by scale. This seems to work fine, except for scale…
jamesinealing
  • 570
  • 8
  • 20
1
vote
2 answers

Unable to click this hyperlink using Greasemonkey

I have a button(hyperlink) with its equivalent HTML code as:
Rajath
  • 2,178
  • 6
  • 32
  • 38
1
vote
1 answer

Greasemonkey: Add a link in a table

I want to modify an HTML page which looks something like this: Test
1
vote
1 answer

XPath Expression returns 'illegal string specified' in Chrome but not FF

so this is an xPath expression which runs fine in a Firefox userscript but fails in a (native) chrome userscript: var nodesSnapshot = document.evaluate("//a[@class='inline-object' and .[contains(@href,'test.com')] ]", document, null,…
user2305193
  • 2,079
  • 18
  • 39
1
vote
4 answers

Problems using HTML Canvas & Greasemonkey not able to drawImage() on 2D context

In my Greasemonkey script, when I obtain a handle on an HTMLImageElement I want to use with an HTML Canvas, I get the following error in Firefox's Error Console (I assume it's because it's enclosed in an XPCNativeWrapper): Error: Component returned…
Greg K
  • 10,770
  • 10
  • 45
  • 62
1
vote
1 answer

LocalStorage - an associative array/object

I'm trying to put a GreaseMonkey script together (with jQuery support) that gathers a little information on a user, that's stored on a subdomain. I finally got it working, after a long while, and rather than 'querying' 60 things each time I refresh…
Mave
  • 2,413
  • 3
  • 28
  • 54
1
vote
1 answer

GreaseMonkey only adds custom click function to first element

I have a page with a bunch of tables that all share a class. I'd like to be able to add a click function to each of them using GreaseMonkey. The script runs but only the first table ever seems to work. Clicking on it causes a message to be…
Tainze
  • 11
  • 1