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
1,332
questions
-1
votes
0
answers
32
views
TamperMonkey script to add products to cart
I am trying to create a Tampermonkey script so that when I go to a product page the item is immediately added to the basket but I cannot do it.
// ==UserScript==
// @name Ajout automatique au ...
1
vote
1
answer
51
views
Creating a custom shortcut for Google Docs (Alt + P download as pdf)
I wrote the following script to download as PDF a Google Docs file; when I click Alt + P nothing happens. I'm using Google Chrome.
// ==UserScript==
// @name Google Docs PDF Download Shortcut
/...
1
vote
1
answer
32
views
UserScript Update Link According to Original Link
What I want is when I visit a specific website that all urls on the PAGE that match (example.com/view=list or example.com/view=card or example.com/view=posts etc..) are changed to:
example.com/view=(...
0
votes
0
answers
27
views
How can I elegantly locate elements without an ID when the website uses frameworks like Tailwind CSS?
Many modern websites are increasingly using frameworks like Tailwind CSS,
which rely heavily on utility classes (e.g., text-center, flex) rather
than IDs for styling. This can make it challenging to ...
1
vote
1
answer
102
views
Trying to hide an element using TamperMonkey userscript
Objective
I am trying to hide an element using Temper Monkey user script
The testing webpage is https://www.dmla5.com/play/8733-1-5.html.
After clicking the pink button, a video will be loaded.
My ...
1
vote
2
answers
78
views
How to focus YouTube search suggestions items?
I currently have this code. This opens the YT search in a new tab when you click the middle-mouse button:
(function() {
'use strict';
var searchIcon = document.getElementById("search-...
1
vote
1
answer
112
views
How to do a javascript fetch without being blocked by CORS policy? [duplicate]
I tried to run this javascript code on a Tampermonkey userscript on many webpages but they all gave the same problem: (I modified some details)
var data="744483"; var url="https://...
0
votes
0
answers
23
views
Trying to write a userscript which redirects from a website which shows ERR_CONNECTION_REFUSED
I'm trying to have a script which redirects me from old burningseries domains to the newest ones, so I don't have to change all my bookmarks in chrome.
I tried the following code, which worked when ...
0
votes
0
answers
99
views
injecting javascript on samsung internet browser?
Is there any way to inject JS in websites on Samsung internet browser anymore? They patched bookmarklets a year ago as a "vulnerability" (So now you can't run javascript: bookmarks)
...
1
vote
1
answer
124
views
userscript (violentmonkey) script runs on first page, does not run on subsequent pages
I am trying to make a userscript that will open the invoices from Amazon in new tabs, so that I can try to categorize my spending better. It's a PITA.
Here's the link:
https://www.amazon.com/cpe/...
1
vote
1
answer
37
views
How to make a Userscript redo all the actions in subsequent webpage navigations of the same URL?
I have a UserScript like the below:
document.querySelector('[title="Select: This option"]').checked = true
document.querySelector('[title="Click to continue"]').click()
After the '...
0
votes
1
answer
111
views
how to apply prefix- config to tailwind cdn before it runs in userscript?
// ==UserScript==
...
// @match */*
// @require https://cdn.tailwindcss.com
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
...
0
votes
0
answers
20
views
How can I modify javascript native fetch function from an extension? [duplicate]
I was trying to intercept and modify browser network requests response. To be exact I need to modify responses based on request url. From searching the Internet I came up with a code which is working ...
0
votes
1
answer
115
views
Userscript to style Shadow DOM elements of arbitrary website
This is my userscript to change the color of visited links. It is assumed to be able to work with any website.
// ==UserScript==
// @name Change the color of visited links
// @description -
// @...
0
votes
1
answer
41
views
@require http://code.jquery.com/jquery-latest.js outdated: How to refer always the newest jquery library?
See below
From a Greasemonkey/Tampermonkey script I want to refer/include always the newest jquery library.
Therefore I coded until now:
// @require http://code.jquery.com/jquery-latest.js
...