Questions tagged [greasemonkey-4]

Greasemonkey 4 is a major milestone, breaking most of the Greasemonkey scripts for earlier versions (although a polyfill restores some compatibility).

Note that for maximum compatibility of existing scripts, Greasemonkey recommends that you switch to Tampermonkey or Violentmonkey:

As mentioned in the main post, Greasemonkey 4 is changing how it runs user scripts. Many user scripts will continue to run as expected, but this will break some scripts. If you rely on such scripts, you might want to install Violentmonkey or Tampermonkey, both of which provide better compatibility for existing scripts.


Additional references:

97 questions
20
votes
3 answers

How do you create a new script in Greasemonkey 4?

Greasemonkey 4.0 has changed its interface, and for the life of me I cannot find any way to create a new script.
matthew_360
  • 5,901
  • 9
  • 32
  • 40
15
votes
2 answers

How to Transfer All Greasemonkey userscripts to Tampermonkey on Firefox 57+

After read that Greasemonkey recommends users to install Tampermonkey or Violentmonkey. I've installed Tampermonkey and now I'm trying to transfer all my Greasemonkey 3.x scripts to be opened on Tampermonkey, but I can't find it's location or even…
Commentator
  • 640
  • 1
  • 6
  • 22
9
votes
2 answers

Is the Immediately-Invoked Function Expression (IIFE) pattern really necessary when writing userscripts?

My question is quite similar to What is the purpose of a self executing function in javascript?, however it concerns userscripts (specifically for GreaseMonkey) instead. I see that some userscripts are distributed with this pattern, and some are…
Marc.2377
  • 7,807
  • 7
  • 51
  • 95
9
votes
1 answer

Greasemonkey Add On does not work properly

I've installed the Greasemonkey Add On but I can neither install any scripts nor I can create my own scripts. When I click on the Add On in the upper menu bar I see following entries: Greasemonkey is active New user script ... Greasemonkey home…
rm -rf
  • 968
  • 1
  • 12
  • 28
8
votes
1 answer

How to implement auto-update in a Greasemonkey script?

I am writing a Greasemonkey script, how to implement auto updating? Is possible put script into GitHub repository and set @version number? And then... is some automatically way how to do it? Or I must manually check.
chosirai
  • 193
  • 3
  • 7
8
votes
1 answer

How to make GM_getValue existent in Greasemonkey on Firefox?

The dupe candidate is for previous GM versions. The problem is likely somewhere around the different scopes where the userscripts can run, as described here. However, as described here, this functionality is currently undocumented for Greasemonkey…
peterh
  • 11,875
  • 18
  • 85
  • 108
7
votes
2 answers

Greasemonkey script folder missing

I am following the instructions to transfer Greasemonkey scripts to Tampermonkey: How to Transfer All Greasemonkey userscripts to Tampermonkey on Firefox 57+. However the folder "gm_scripts" mentioned in the instructions does not exist on my…
Danny R
  • 79
  • 1
  • 3
6
votes
0 answers

Why do functions and classes assigned to `window` not equal themselves in a GreaseMonkey script?

I have a class Foo with a static method that compares this to Foo, and for some reason the output of that comparison is false: // ==UserScript== // @name GreaseMonkey test // @version 1 // @grant none // @include * //…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
5
votes
2 answers

How do I run code on DOM ready in Greasemonkey 4?

With the update to Firefox 57 and Greasemonkey 4 a number of my userscripts broke. In some scripts I used: document.addEventListener('DOMContentLoaded', doStuff, false); This no longer works in Greasemonkey. What is the proper way to add an…
jahu
  • 5,427
  • 3
  • 37
  • 64
5
votes
1 answer

How to store Greasmonkey 4 Scripts in git

With the new update to Firefox 57 and Greasemonkey 4.0 it seems that the gm_scripts folder is no longer where the user.js scripts are stored. Where are the scripts stored now? Any suggestions for keeping these scripts in git?
Rob
  • 3,687
  • 2
  • 32
  • 40
4
votes
3 answers

Using Javascript, refresh a page every 30 seconds UNLESS a phrase appears

Existing code I use the following code in ViolentMonkey (or GreaseKit or TamperMonkey) to refresh a page every 30 seconds: setTimeout(function(){ location.reload(); }, 30*1000); Can I make it stop? This has been working fine for many years. But…
4
votes
1 answer

Greasemonkey XHR not showing in firefox network devtools

I wrote a script as a user script and ran it on a specific website with Greasemonkey. It worked perfectly, but I want to see requests that my script has sent in the Firefox developer tools network tab. Currently it shows the page's requests and not…
3
votes
1 answer

YouTube - don't display context menu on right click

The idea: seek YouTube video by dragging and dropping on the video player with right button (e.g. 1 second for every 2% of screen width). So on a 1920x1080 screen, if I press the right mouse button, drag it some 384px (20%) to the left and then…
2
votes
1 answer

What are the consequences of changing a UserScript's @namespace key?

I want to move some userscripts from greasyfork.org and openuserjs.org to GitHub. Currently I'm updating the scripts manually on both sites, but I read up about the @downloadURL and @updateURL keys, so managing updates in one place at GitHub seems…
Tad Wohlrapp
  • 1,848
  • 1
  • 13
  • 18
2
votes
1 answer

Greasemonkey - access in page window Javascript variable from userscript?

I'm trying to access a javascript variable loaded in the page from a Greasemonkey script. I tried the var name directly , or using window.varname (which works in the console), but neither of them load in the greasemonkey script (the window variable…
wesinat0r
  • 121
  • 8
1
2 3 4 5 6 7