Questions tagged [userscripts]

Use the Tampermonkey tag if running Tampermonkey or Violentmonkey, use the "Greasemonkey-4" tag if running that engine on Firefox. For all other engines, or multi-engine scripts, use the "Userscripts" tag. Userscripts primarily refers to JavaScript extensions for web browsers, used to automate or customize actions, the layout, or other aspects of the user experience.

Userscripts primarily refers to extensions for web browsers. Userscripts can automate or customize actions, and/or they can change the layout or even "mash up" different websites.

Userscripts are commonly installed in browsers using a userscript manager add-on/extension, but some browsers have limited native support.

On most browsers, when using a userscript manager, userscripts have access to an extended API that allows some actions that are not permitted for ordinary JavaScript code running in the page scope. However, that extended API is significantly less powerful than what's available to actual browser extensions.

Userscripts are available in most browsers:

Scripts meant for Greasemonkey or Tampermonkey should be tagged or , instead.
If the userscript is meant to be cross-browser compatible (not always worth the trouble), use both and .

Userscript API changes:
For quite some time, the APIs provided by userscript managers were reasonably cross-compatible. Those APIs were synchronous, with the exception of AJAX calls. However, Greasemonkey 4.X re-wrote the APIs it presents to userscripts such that they were asynchronous, using Promises, which makes scripts using those APIs not backwards/cross-compatible. The Greasemonkey project provides a polyfill which userscripts can @require in order to write scripts using their new APIs which will function in other userscript managers.

Tampermonkey has begun to provide support for these Promise based APIs.

Resources:

1300 questions
-1
votes
2 answers

Convert userscript from Firefox/Chrome to Internet Explorer 9?

I'm a student who isn't in the computer sciences or programming but I've been looking for a script for my parents who are foreign and don't understand internet lingo. I've found the script below on userscripts.org (all credit to the writer) and it…
-1
votes
1 answer

Userscript breaking pages outside of domain

Even though I have my userscript restricted to one domain, any site I visit that uses Jquery experiences all kinds of nasty issues when my script is active. Checking the error console in chrome reveals an identical error on all sites: "Uncaught…
ajw-art
  • 173
  • 1
  • 1
  • 12
-1
votes
3 answers

Determining if a specific image/link is on a page

I'm trying to create an onkeydown event, that will automatically move an image gallery on a specific site to the next image, or back. Problem is, the link structure isn't structured efficiently. So basically, I"m trying to find within the…
Thomas Ward
  • 2,714
  • 7
  • 36
  • 51
-1
votes
1 answer

How to add a resizable, dragable overlay to a webpage?

I'd like to make a userscript that can put an resizable, dragable overlay over a browser game. Only I don't have a clue how to start. It'd basically have to be a div with some styling and javascript applied to it, containing an