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
0
votes
0 answers

Run a function when the DOM changes?

Is there a DOM event that fires when elements are created? I'm using the script below to scan for and remove a HTML div that is created dynamically. I'd prefer to hook into the DOM event model instead of polling. function…
Kickaha
  • 3,680
  • 6
  • 38
  • 57
0
votes
0 answers

Anyone having problems with Greasemonkey @includes not firing?

I write Greasemonkey scripts to do all sorts of automation and screen scraping for my job. I've got a list of items/accounts to work on and I iterated through them pulling data from various web tools. I trap the document ready event and start my…
0
votes
1 answer

Displaying only the drop-down options which are relevant

Only those Drop Down Options which are relevant to me on a web-page should be visible to me. (Others should be hidden) Example: Instead of a drop-down which has options: A B C D E F I want only below 2 options to be visible to me A C This would save…
0
votes
3 answers

Not able to import a GM user.js file into tampermonkey

I am attempting to move my GM scripts to tampermonkey following this post. I have exported my scripts from GM as a zip folder, duplicated the user.js file, compressed it as a zip file, and tried importing Both the zipped user.js file And the plain…
0
votes
1 answer

Call a function in Javascript file from tampermonkey script

I'm trying to write a tampermonkey script and want to call a javascript function which is provided by the webpage. The HTML of the page looks like this:
user1692342
  • 5,007
  • 11
  • 69
  • 128
0
votes
1 answer

Userscript to click login button (https://steamcommunity.com/login)

I'm trying to automatically login to when https://steamcommunity.com/login/ is opened. Using either submit() or click() redirects me to https://steamcommunity.com/login/# instead of being logged in. If I remove steamLoginForm.submit(); and click…
holypase
  • 3
  • 3
0
votes
1 answer

How do I fix an infinite loop in a hacked version of waitForKeyElements?

My company's website uses the Metronic Horizontal Menu admin panel, but it's an older version that uses a Gear instead of the user profile picture and name. Before Firefox 30, this Greasemonkey script was working and would move the "My Profile" and…
NobleUplift
  • 5,631
  • 8
  • 45
  • 87
0
votes
1 answer

GM.xmlHttpRequest: Received no URL Error

This script is run on a Amazon deals page: // ==UserScript== // @name Unnamed Script 138015 // @version 1 //@include http://www.amazon.in/* // @grant GM_setValue // @grant GM_getValue // @grant GM.xmlHttpRequest //…
0
votes
0 answers

Hashing a site's password in Greasemonkey

There is a website that annoyingly doesn't save passwords. I had to create this unsafe, unsecured script (which I run with Greasemonkey) to save the password: // ==UserScript== // @name example.comAutomation // @include *example.com/* //…
Osi
  • 1
  • 3
  • 9
  • 30
0
votes
1 answer

Implement polling with grease monkey script

I want to execute a tamper monkey script on facebook page which polls database periodically for data and performs some actions. I tried implementing polling with ajax and below is the code for it (function poll() { setTimeout(function() { …
Aarish Ramesh
  • 6,745
  • 15
  • 60
  • 105
0
votes
1 answer

Using Javascript to hide elements with specific data-test-id value

I often use a simple Greasemonkey JS script to hide elements on web pages - this is a basic one I use to hide some ads on Yahoo Mail which are in DIVs with a specific ID: function addGlobalStyle(css) { var head, style; head =…
4532066
  • 2,042
  • 5
  • 21
  • 48
0
votes
1 answer

tampermonkey on update make changelog popup

Is there any way to make a changelog pop up when a TamperMonkey script updates? I have already tried using LocalStorage to store current GM_info, but GM_info doesn't seem to exist/work.
MilkGames
  • 1
  • 3
0
votes
1 answer

Javascript - Let other scripts execute, then continue script

I have a website with couple of dropdown lists. When a value is selected in one dropdown list, the site runs a javascript code that changes the options in other dropdown lists. (Example: I select a country in the first list and the dropdown below it…
Jan Horčička
  • 671
  • 1
  • 11
  • 26
0
votes
1 answer

How to overwrite with fake data or disable "fingerprinting" by user identifying js object: navigator

The navigator object is used to identify users browsing. Even if you have extensions installs which help block a lot of identifying scripts, it seems that the navigator object is always available. Some identifying characteristics I'd like to feed…
-1
votes
1 answer

Is it possible to programmatically set the webpages a userscript can run on?

I'm currently developing a userscript that could be in use for a few years after I've left the company. The target audience has basic computer literacy--enough to fill out a simple configuration menu. I worry that the scripts could break because the…