Questions tagged [tampermonkey]

Tampermonkey is a userscript manager for Google Chrome, Microsoft Edge, Safari, Firefox, Opera, Dolphin Browser, and UC Browser. Tampermonkey scripts are privileged JavaScript code snippets, with access to a custom API that allows you to customize the way web pages look and act.

Tampermonkey is a userscript manager for Google Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.

Tampermonkey allows users to apply customized javascript to sites, to alter how the sites look and/or behave. Multiple websites can even be "mashed up" via cross-site scripting techniques. (Tampermonkey scripts have fewer security restrictions than ordinary javascript).

Tampermonkey differs from native Chrome userscripts in that Tampermonkey supports almost all of the Greasemonkey API, and Tampermonkey scripts are now easier to install and manage than native userscripts. Installation is not restricted to Google's store, so popular sites like userscripts.org still work.

Tagging Guidance:

Please do not tag Tampermonkey questions with , unless the script is meant to also work as a native Chrome userscript (which is usually not the case).


References and Resources:

1715 questions
0
votes
1 answer

How to trigger rail's data-method="delete" via javascript

I would like to make an extension which injects code into a specific site allowing the user to delete multiple posts at once instead of having to delete them manually one at a time. The element that seems to trigger the removal looks like this:
i3rendn4v05
  • 539
  • 1
  • 4
  • 12
0
votes
1 answer

Tampermonkey - Issue using jquery and jquery UI

I want to add an "info div" on a website. For this, I add some html via a Tampermonkey script: // ==UserScript==  // @name         New script  // @namespace http://tampermonkey.net/  // @version      1.1  // @description  try to take over the…
Mr Jenkins
  • 27
  • 6
0
votes
1 answer

Tampermonkey script is not redirecting to the expected URL?

I am trying to replace the visited URL with another URL whenever certain search terms are used. However browsing bing.com for the term "foobar" results in the URL bing.com/www.google.com.au instead of just google.com.au. I have tried using both…
yoshiserry
  • 20,175
  • 35
  • 77
  • 104
0
votes
1 answer

How do I make a button to toggle this script on/off

I want to make a button (no style in particular) appear that will toggle this script on and off var meta = document.createElement('meta'); meta.httpEquiv = "refresh"; meta.content = "30"; //Change the 30 to however many seconds you want to…
0
votes
2 answers

javascript async call in a for loop

Rookie question. It could be a possible duplicate, but I can't wrap my head around how to restructure the code. How should I structure the below code so that the console would print the following: Here1 Here2 Here1 Here2 Here1 Here2 Now it…
tadalendas
  • 1,461
  • 3
  • 16
  • 37
0
votes
1 answer

Unable to retrieve AJAXed content

I am unable to retrieve a username from a dynamic webpage using the wait function. However when I execute $("#label301354000").text(); in Chrome Developer tool, I get my username. Any idea how to tweak the function to capture the id value? //…
Ura
  • 2,173
  • 3
  • 24
  • 41
0
votes
2 answers

How to run a selector on a dynamically generated page?

I have a selector which works in GM_addStyle but not in jQuery. I want to use jQuery :contains() which is not available in CSS3. But, it appears that the id does not exist on my page when I view source but it's dynamically generated. How do I tell…
Ura
  • 2,173
  • 3
  • 24
  • 41
0
votes
2 answers

How can I modify an anonymous javascript function with tampermonkey?

Here is the block of code I want to replace: $(document).ready(function () { $(".button-purple").click(function () { interval = $(this).attr('id'); name = $(this.attr('name'); if(Number($(this).val()) ===…
jacob404
  • 3
  • 2
0
votes
2 answers

Page search and textbox autofill with javascript in Tampermonkey

I am trying to write a script in Grease/Tampermonkey which will search a webpage for an question, and then fill in the textbox with the correct answer. This is what I've come up with so far: //There are 12 options in each array var questions =…
0
votes
0 answers

document.keydown doesn't work in chrome

I have this code, which is supposed to press "W" multiple times when "E" is pressed, it works well in fire fox but i couldn't get it to run on chrome, i keep getting an error saying Uncaught TypeError: document.onkeydown is not a…
0
votes
0 answers

How to display a hidden element with Tampermonkey?

I am struggling to get Tampermonkey (with Chrome) to automatically change the display style of a field on a website. I would like to display the following hidden element:
Jamie Wright
  • 1,259
  • 3
  • 10
  • 11
0
votes
2 answers

Automatically set a value to a select box after dynamically loaded option value

Suppose i have a textbox and a select box with like this.

Ashis Biswas
  • 747
  • 11
  • 28
0
votes
0 answers

How to alert everything in the body (using TamperMonkey)

function main() { var text = $('body').text(); alert(text); } setTimeout(function(){main();}, 2000); I want everything in the body alerted after 2 seconds, but I can't seem to get it to work, I'd appreciate if somebody could help, thanks!
Cian Flint
  • 71
  • 10
0
votes
0 answers

how to read URL behind element / object?

I wonder if there is any .js / app to do this: there is a hosting site site.aa which hosts many diferent URL's and one of those URL is site.bb/x and I would need to pin point that URL via URL mask (which I would set up in some settings) and copy it…
player0
  • 124,011
  • 12
  • 67
  • 124
0
votes
0 answers

override deprecated javascript function in Greasemonkey

This script broke for current gecko browsers. It users Window.captureEvents() and Window.releaseEvents(). The release function no longer appears to be working. Is there a greasemonkey script that can override this script and release the lock from…
1 2 3
99
100