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
1 answer

Tampermonkey/Greasemonkey only running in iframes

I don't know why, but my greasemonkey/tampermonkey script refuses to run on pages that have an iframe. The script runs inside the iframe, but not on the root domain. If I use the @noframes option, nothing happens at all on pages with an iframe. I've…
kryo
  • 716
  • 1
  • 6
  • 24
1
vote
2 answers

Greasemonkey to Change Readonly from True to False

trying to change a websites text entry field that is currently set to read only to false. The reason being it has an 'Upload" button where you browse to the file on your computer then hit upload. I just want to set the path in a script but since the…
user2044236
  • 13
  • 1
  • 3
1
vote
0 answers

Push notifications using Grease/TamperMonkey userscripts?

I would like to push notifications or updates out through my userscript. It's coded in Javascript, like all userscripts. The only thing I have thought about, is getting a server which would host my file. Then the userscript would check if that file…
Lemvig Kiggeren
  • 317
  • 1
  • 3
  • 13
1
vote
1 answer

document.getElementsByClassName() works, but inconsistent

I was trying to create a greasemonkey script which removes Facebook and twitter from a website. In my case 9gag. I looked and I need to hide the classes: 1. 'social-action' (works fine) 2. 'badge-sticky-social sticky-social' (every second post) 3.…
1
vote
2 answers

Why can't I generate a 'click' event directly from my user script?

I'm making a script to interact with a web page. So, I need to generate click events. (I'm using GreaseMonkey) Well, my question is: Why isn't this working from the user script: $(document).ready(function(){ …
JosEvora
  • 134
  • 1
  • 9
1
vote
1 answer

Greasemonkey script compiler is showing an error

I have script like this // ==UserScript== // @name messi // @namespace http://messi.com // @description example script to alert "barcelona" on userscripts page // @include http://userscripts.org/* //…
open source guy
  • 2,727
  • 8
  • 38
  • 61
1
vote
7 answers

How can I refine this Javascript code to refine it so it only work on links from images (and NOT links from text)

I want to make some refinement to some code from a previous question: // the new base url var base = ' https://www.example.co.uk/gp/wine/order?ie=UTF8&asin='; var links = document.getElementsByTagName('a'); for(var i = 0;i < links.length;i++){ …
1
vote
1 answer

How to delete one table row that has an empty class attribute?

Is it possible for a Greasemonkey script to delete one row which has a null class ()? The problem is that inside a tag there are two rows with a null class. The row to be deleted is the first one.
jackusCTB
  • 7
  • 4
1
vote
2 answers

Get innerHTML from table

I'm trying to create a popup that displays the Price of FTC when the table loads using javascript. I'm running my script using GreaseMonkey in Firefox. The site I'm running my code on is: https://www.coinmkt.com/#/ The code below does run the script…
excelVBAmaster.com
  • 158
  • 1
  • 2
  • 12
1
vote
1 answer

using innerHTML with Greasemonkey

I am writing an userscript (for greasemonkey/firefox) to be used in a webpage. It contains a series of tag with a onmouseover attribute that do the following:
nick2k3
  • 1,399
  • 8
  • 18
  • 25
1
vote
2 answers

Document.oncontextmenu, component is not available (firefox)

I have a script for a website, and one of the things ti does right at the end if attempt to disable an anti-right click protection in a website if($("span[class=MembersNameDisplay]").exists()){ var list_row =…
Tom J Nowell
  • 9,588
  • 17
  • 63
  • 91
1
vote
1 answer

Greasemonkey script to reorder page sections that are split only by HTML comments?

I have been trying to change the order of elements in this code so the Account Information, Statistics and Website Traffic dividers (in that order) are listed before the jump-search divider. The target page HTML looks like this (the page is a…
RobWhite
  • 13
  • 4
1
vote
1 answer

onkeydown Not Working in Greasemonkey

I have written the following Greasemonkey script to add or remove cookies in the popular game Cookie Clicker. function addCookies() { var cookiesString = prompt("How many cookies would you like to gain?"); var cookiesInt =…
user2962388
  • 295
  • 3
  • 6
  • 12
1
vote
1 answer

Triggering an alert with a keypress

I am writing a Greasemonkey script. I want to trigger a certain code to run when the user presses the "Q" key. I did a little bit of research, and most of the sources I saw suggested using window.onkeypress. To test this method, I created a…
1
vote
5 answers

Using jQuery in a GreaseMonkey script for GMail

I'm trying to write a Greasemonkey script to change colours on the default GMail UI, using jQuery to select the element I want to change. However, I'm having no end of difficulty getting thing working/debugged. When I eventually corrected my…
ProfK
  • 49,207
  • 121
  • 399
  • 775