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

Updating onclick's string value with Greasemonkey

I'm trying to write a Greasemonkey script to update the onclick value of a bunch of links on a page. The HTML looks like this: text I need to update…
Devin
  • 851
  • 12
  • 32
1
vote
1 answer

Greasemonkey code to put Youtube iFrames in spoiler

On a forum that I'm a member of we have a large number of threads which end up having a lot of Youtube videos embedded on, and quite a lot of people find this quite annoying when scrolling down the page. So, I would like to use Greasemonkey to wrap…
Olly88
  • 13
  • 2
1
vote
0 answers

Why does my modal window load blank?

I'm brand new to javascript, and not surprised to be having an issue. Here's my userscript: // ==UserScript== // @name Open Modal-External Page-Iframe // @version 0.1 // @match http://barackobamaisyournewbicycle.com/ // @require…
samstav
  • 1,945
  • 1
  • 20
  • 20
1
vote
2 answers

How can i select the correct radio button with greasemonkey?

I want to create a script that would select the correct option automatically Here is what I have so far http://jsfiddle.net/VqQaN/58/ var labels = document.getElementsByTagName('li'); //get the li for (var i = 0; i < labels.length; ++i) { //loop…
1
vote
0 answers

Greasemonkey: remove certain "related videos" by keyword from the Youtube player

I am trying to remove certain "related videos" by keyword from the Youtube player (which shows at the end of a video). The purpose is that sometimes there are certain content that I don't want to see. I am a total greasemonkey and javascript noob.…
1
vote
1 answer

Using Javascript to click on a given button AND have it open in a new window

When this page loads, I want to simulate automatically clicking the send me this thing button whilst having it open in a new window (or new tab) There will only ever be one send me this thing button on any page like that What for? This is for…
Sockie
  • 189
  • 1
  • 9
1
vote
0 answers

WaitForKeyElements automating several tasks on page

I am trying to (using Greasemonkey) simulate several actions on a page that is entirely Ajax based. Paste Bin for HTML First step is to save the data on the page. Which causes a dropdown (with id of BP_Content_ddlCoupon) to be refreshed. I then…
Bill Tepe
  • 53
  • 5
1
vote
1 answer

lean&fast way to make an addon work for all major browsers? firefox,chrome,[opera,internet explorer,safari]

Yet there are tools to make one addon for all major browsers at once, see: crossrider, kangoextensions and http://besttoolbars.net/products/addon_framework With greasemonkey and a converter to a full firefox addon, i already made an addon, that…
1
vote
1 answer

Problems inserting a text node before an existing element using Greasemonkey

I have a script that gets the current server time and it works great. Problem is, I'd like to insert the server time right before the clock on the page (that shows local time even though activities on the site tell you that you can do it again at a…
Kat Cox
  • 3,469
  • 2
  • 17
  • 29
1
vote
1 answer

Disable one bit of Javascript in a page

Not actually, about programming, but more about programming tools (Firebug, Chrome Developer Tool). I understand from the FAQ that this is ok here. I am stumbling on a legacy redirect in one of our HTML pages, and cannot get rid of it, neither with…
Gerard Yin
  • 1,283
  • 1
  • 12
  • 24
1
vote
1 answer

How to Allow Window.opener.location.href Permission For Greasemonkey?

I'm using GreaseMonkey in FireFox with the following code if (window.opener) { alert(window.opener.location.href); } However, i'm getting a Permission Denied error, possibly due to cross-domain policy. How do i overcome this protection?
Nok Imchen
  • 2,802
  • 7
  • 33
  • 59
1
vote
1 answer

How to get Rails to serve my dynamic Greasemonkey script with the proper MIME type?

I have a static Greasemonkey script and it works fine. I have a rails 4 application, and I just want to customize my script for current user. My problem is I can render the script named script.user.js, but the content type is always text/html and…
1
vote
1 answer

If URL = this { //do this } else { //do this }

I know this may seem simple, I thought so myself when I first tried it, but it turns out i'm having issues with it. This is a Userscript and I am wanting it to check if the URL is "http://orteil.dashnet.org/cookieclicker", then do one thing (but…
1
vote
2 answers

How to save page settings for the next session?

With my Greasemonkey script, I've added a checkbox. My idea is that if the checkbox is true do something, but if it is false do nothing. I also want the checkbox to remember the user's last choice, so that if the user closes the webpage or browser,…
Madh
  • 131
  • 1
  • 12
1
vote
1 answer

How to compress/decompress strings in a userscript?

I've been trying to figure out why a userscript I'm working on is slow in Firefox yet blazing in Chrome and Safari. One reason I've identified (though maybe not the only reason) is that the large file size of the userscript is having a big effect.…
mix
  • 6,943
  • 15
  • 61
  • 90