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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Join multiple files into single file

I'm trying to come up with a way to have multiple files joined into one prior debugging/publishing without adding extra "garbage" into the final code. My first instinct was to create "...
vanowm's user avatar
  • 9,501
-2 votes
0 answers
39 views

programmatically insert text into a React managed div [closed]

I want to write a userscript for Tampermonkey, i.e. in vanilla JavaScript. The userscript should fill text into the div with the id "inputBoxSummarizer" on website https://quillbot.com/...
Nvl's user avatar
  • 1
0 votes
1 answer
37 views

Userscript to simulate click on react managed button

I want to write a userscript for Tampermonkey, i.e. in vanilla JavaScript. The userscript shall simulate a click on the "Paste Text" button on the website https://quillbot.com/summarize. ...
Nvl's user avatar
  • 1
0 votes
1 answer
34 views

No button click event in tabs (Tampermonkey)

I have made single tabs that contain buttons. enter image description here // Create the tab content const tabContent = document.createElement('div'); // Add your desired content for each tab ...
ThomasWalkerWH_01's user avatar
0 votes
0 answers
55 views

why this simple Userscript not working as I wanted? [closed]

I have been trying to make a userscript and I made one for Udemy. It checks the course's progress and calculates the percentage, then adds the percentage after the progress text. But I don't ...
Shahariar Hossan's user avatar
0 votes
2 answers
152 views

JavaScript Regex to replace VISIBLE text in webpages

I'm looking to match strings in a .json list called "mylist" with visible strings only on any webpage any time they appear. Matching strings would be replaced with the term "REPLACED!&...
pythonInRelay's user avatar
0 votes
1 answer
56 views

How to get this field to autofill - Kotak securities Neo login page nameless idless field

In this website https://neo.kotaksecurities.com/Login How do I get the mobile number field to autofill? The input field neither has a name nor an id. The firefox autofill extension fails to detect the ...
Mavin's user avatar
  • 59
0 votes
0 answers
27 views

CDN that bundles npm packages for browsers?

TLDR: Does anyone know of a npm package CDN that bundles the Javascript into a non-module js file? I’m looking to use this package in a userscript. It’s a simple userscript, so I’d rather just use the ...
Andy's user avatar
  • 357
-2 votes
1 answer
21 views

unmangling a URI with '•' instead of '.'

I use a forum that has a policy against direct commercial links, so what I often do is to mangle it so it remains readable but requires manual copy/paste/edit in order to work. Instead of www.example....
RJVB's user avatar
  • 698
0 votes
1 answer
98 views

Run a tampermonkey user script with Puppeteer

Is it possible to run a Tampermokey script in headless chromium with Puppeteer? If so, how do you do it?
3jay1's user avatar
  • 75
0 votes
1 answer
45 views

Userscript doesnt work when injected but works when run in console

i am trying to make a userscript to add a download button to youtube, i tried tampermonkey and greasemonkey but they dont work. the script doesnt throw any errors when run manually on console. it adds ...
Eren's user avatar
  • 36
0 votes
1 answer
25 views

Own toolbar above website instead of cover? Tampermonkey Userscript

I want to have my own toolbar on specific websites and all in all it works fine. My only problem is, that the toolbar is not above and with this issue I can't use the original navigation. Any ...
Don't Hesitate's user avatar
0 votes
0 answers
32 views

Is there a way to use the fetch event listener in a serviceworker created in a Violentmonkey script?

For a userscript, I need code that caches an Audio file upon fetch and replaces a request on a re-fetch, however I couldn't find a way to register a serviceworker under a userscript that can intercept ...
SeetheMoar's user avatar
0 votes
0 answers
29 views

How do I use `window.external.Tampermonkey.openOptions`?

I am doing some research on how Greasyfork detect whether a script is installed or not. After doing some debugging and searching, I noticed that Greasyfork can access certain API via window.external....
PRO's user avatar
  • 169
0 votes
1 answer
51 views

Userscript sometimes gives 405

I am trying to create a (Tampermonkey) userscript to automate the process of accepting an agreement for when I need to access a certain network (as it becomes annoying to accept the agreement each and ...
Bill Joe's user avatar
0 votes
1 answer
37 views

Does the order of rules in userscripts make a difference?

I'm creating a userscript recently, and I've noticed a significant difference how people order the rules in userscripts? Does it really matter? Does this: // @name Hello, name here! // @author ...
Sally loves Lightning's user avatar
0 votes
1 answer
50 views

How to change the title with UserScripts?

i'm trying to change the title of twitter since they changed it to have X in it, but from all i can gather here on stack overflow and Github etc is the way to do that by using document.title, but when ...
Biast12's user avatar
0 votes
2 answers
58 views

how to detect a Key Sequence in Javascript

i am writing an userscript that post in a forum each time a shortcut sequence is executed [ ctrl + enter ], but the function that i wrote excecutes both keydowns as separate events, and not a single ...
hopepill's user avatar
0 votes
1 answer
71 views

Userscript @match & @exclude to match paths at certain level, but not sublevels

How can one use @match and @exclude rules in a userscript to match URLs that have an arbitrary path at a certain level (a "level" being each new / in the path, not sure if there's a more ...
ETL's user avatar
  • 186
0 votes
0 answers
35 views

Userscript for chromium/Bromtie on Android for playing Youtube Music continuesly

I am using youtube music in my webbrowser on Android for blocking ads this way. I have a userscript installed in bromite for this job. As a side effect, the music stops playing after each song, even ...
sebast1an's user avatar
1 vote
1 answer
59 views

Can Tampermonkey force tab to close despite "Changes that you made may not be saved"

Under certain conditions my userscript allows users to close the page via button press, but when I issue window.close() I get the message: "Leave Site? Changes that you made might not be saved&...
cssyphus's user avatar
  • 38k
0 votes
0 answers
45 views

Userscript not detecting url change on some pages (e.g. Facebook)

I'm trying to write a userscript to redirect the URL of certain webpages, including Facebook. My (limited) understanding is that there is no direct way for a userscript to tell when the URL changes (...
ETL's user avatar
  • 186
1 vote
1 answer
31 views

Why does the checkbox I added only show up on one page (the profile page) instead of all pages, despite the correct @match pattern?

I am making a tampermonkey userscript. its purpose is to remove a dom element that displays user reputation points, which it does do, and the checkbox is to toggle it on and off, and that also works ...
Minnie Minnie's user avatar
0 votes
0 answers
49 views

userscript failing to intercept most requests

I have this userscript for duolingo.com that used to intercept and log every network request url, but no longer does. Now it only logs a few requests and nothing else. Here's the script: // ==...
chocojunkie's user avatar
0 votes
1 answer
63 views

Why can't my user script close a window it opens?

I have this userscript: var spans = document.getElementsByTagName('span'); var promoted, parent, link, tab, button; function findParentDiv(element) { if (!element) { return null; } parent =...
Kwisatz Haderach's user avatar
0 votes
1 answer
365 views

How to update a userscript's code in Tampermonkey's script storage directly

... such being able to use my preferred IDE for developing and avoiding C&Ping the code into TM's Edit window very, very often repeatedly? I found /home/<user>/.mozilla/firefox/t1b9jtvd....
Gerold Broser's user avatar
0 votes
1 answer
226 views

How do I automatically download an image on danbooru when the site loads with userscript?

I have little experience in coding so it's probably a problem with me doing stuff wrong but I couldn't find this anywhere either. For nearly 2 hours I tried to make a userscript that automatically ...
AnimeRaupe's user avatar
0 votes
0 answers
51 views

How to replace deprecated synchronous XMLHttpRequest in a userscript?

I'm the creator of JANITOR – Java API Navigation Is The Only Rescue, a userscript which: Inserts a navigation tree for modules, packages and types (interfaces, classes, enums, exceptions, errors, ...
Gerold Broser's user avatar
0 votes
0 answers
23 views

Is there a solution to prevent bfcdownload() function from continuously asking to overwrite existing files in R console?

After executing this code pkgsList <- list() for (i in 1:length(packageNames)) { if (packageNames[[i]] %in% pckgs) { rank <- pkgDownloadRank(packageNames[[i]], "software", ...
Sonali kumari's user avatar
0 votes
0 answers
79 views

Violentmonkey Script to Redirect Page

I'm trying to write a script that saves a url and a custom message for said url, and when I visit the url, it will redirect me to a new page with the custom message and a button to proceed to the page ...
CluelessDumbo's user avatar
0 votes
1 answer
156 views

Conversion from CSS to UserScript

I'm trying to convert a small piece of UserStyles visual theme code into a TamperMonkey script. Until a few months ago, UserStyles.org had a feature that allowed you to do this with the click of a ...
Васёк's user avatar
3 votes
2 answers
61 views

userscript addEventListener seemingly not attaching to element

I'm trying to attach an onclick event listener to an existing element (notably not a button with a form, it's a simple div) on a webpage through a userscript. However, it appears that, even though to ...
Wolfie's user avatar
  • 143
0 votes
0 answers
129 views

how add react component in tampermonkey script?

Can you just give an example of embedding a react component with its hsk markup in a tampermonk script? Suitable even for creating: <div> Hello </div> I try: // ==UserScript== // @match ...
Roma N's user avatar
  • 174
0 votes
1 answer
46 views

How to remove DIV based on inner SPAN in tampermonkey

noob here, I want to hide the entire div using Tampermonkey when it contains "Promoted" under span, <div> <div class="relative"> <div class="ember-view ...
kuruvi's user avatar
  • 651
0 votes
0 answers
161 views

Excluding dependencies by webpack.externals prop causes `Object.defineProperty called on non-object` error

I'm building userscript boilerplate. This project relies on tsyringe and reflect-metadata packages. I want them not to be included in resulting bundle, instead they should be loaded by userscript ...
Kenya-West's user avatar
0 votes
1 answer
46 views

How can I implement a button click event listener that will survive DOM updates (ie. in a single-page application) [duplicate]

I am writing a ViolentMonkey userscript that will add an event listener on a button #mark-watched, so that when it is clicked, the #next-video button will be clicked automatically. The website doesn't ...
mmonj's user avatar
  • 9
-1 votes
2 answers
213 views

Where and how long are values stored by user scripts persisted?

Greasemonkey (and other user script managers) provide functions like GM.getValue and GM.setValue in its API, which allow scripts to store and retrieve arbitrary script-specific values. Greasemonkey’s ...
user3840170's user avatar
  • 26.8k
0 votes
1 answer
63 views

Violentmonkey How to compress string

I am relatively new to Javascript and am currently making a Violentmonkey script. In my script I have a relatively big string that I want to compress but I don't know how I would do that since most ...
Der_Floh's user avatar
  • 129
3 votes
2 answers
407 views

Javascript: copy selection to clipboard using tampermonkey

This code (courtesy of this page), does its job well when used inside a plain html file. In particular, it successfully copies selected text to clipboard. function copySelectionText(){ var ...
JitteryNutmeg's user avatar
0 votes
0 answers
33 views

how to use tampermonkey to search all employees from my list on the search bar and add to the dropdown list? Currently I have to search one by one

Brief: I have an attendance system which displays the list of employees in a multiselect dropdown and has a search bar on top to search employee by name/ID and on selecting moves the selected employee(...
Cocoa's user avatar
  • 63
0 votes
1 answer
85 views

Userscript - multiple vs single script file

Technically speaking, are there any difference in performance when having multiple userscripts running on the same page vs combining them in a single script? Assuming functionally the same and script ...
user3315073's user avatar
0 votes
0 answers
52 views

Hooking javascript object literal constructors to modify objects created in inaccessible contexts

I'm attempting to modify an object present in code that I do not control and cannot directly alter. Ideally, I'd like to do this from a bookmarklet, but the extra permissions of a userscript are also ...
Lee's user avatar
  • 33
0 votes
1 answer
101 views

Greasemonkey/Tampermonkey userscript on all upon tabs?

I've made a context menu to execute a function in GM/TM. Is it possible to execute a function in all open tabs? If I were to create a userscript with a single command like: location.reload(); Is it ...
Lionstrike's user avatar
2 votes
2 answers
45 views

How can I ignore all the forward slashes and just match the page with Tampermonkey?

How do I match a page if it ends in B08FP95RQD? For example, I need to match: https://www.amazon.com/Shark-IZ363HT-Anti-Allergen-Lightweight-Self-Cleaning/dp/B08FP95RQD I tried // @match *...
Knight's user avatar
  • 29
0 votes
0 answers
51 views

How can I add a button with Tampermonkey to Facebook?

I have this script: // @match https://www.facebook.com/groups/* // @grant none // ==/UserScript== (function() { 'use strict'; // Add the "Approve All" button to the ...
Inna Drobi's user avatar
1 vote
2 answers
62 views

Can a server detect it when I use a userscript to change the innerHTML of an element? [closed]

I made a userscript to change the look of an element at page-load to trick my friends. Can the server detect that I am changing the DOM on my end? I know just a tiny bit of web dev and google resulted ...
efebekri's user avatar
1 vote
2 answers
56 views

Run user script only if page has a password field

I have a short piece of JavaScript code that I'm using as a user script. The action works fine, but I want to add if-statement to it and don't know how to structure it. In plain language, I want it to ...
colorful-shirts's user avatar
0 votes
0 answers
26 views

How to complete a text field located on an external page, redirecting from the BLazor WebAssembly application

On my page I have a button, which redirecting to new Google Meet page. On that page is a textbook which ask about to write our nickname before we will join to meeting. I would like to achieve that ...
Mahatma Gandhi's user avatar
0 votes
1 answer
2k views

AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page

Using Tampermonkey, I have set up a script that monitors a webpage and alerts me whenever a set of conditions are met. It works fine as long as the page has focus and being interacted with which is ...
Enissay's user avatar
  • 4,959
1 vote
1 answer
72 views

Remove inline HTML style to expand table and remove double scrolling on site aonprd

I am attempting to remove an inline style on the site aonprd. Specially on all pages like this https://2e.aonprd.com/Equipment.aspx. I can not stand this double scrolling that happens and wish to ...
Lan's user avatar
  • 13

1
2 3 4 5
27