r/userscripts 11h ago

Trying to highlight specific words on a page

2 Upvotes

Hi all, brand new to Userscripts and terrible at code.

I am trying to find a way to highlight specific words or characters on an HTML/CSS/JS page in Safari. Has to be Safari due to company requirements.

A good example of what I want to do it like the find command. I found Multi Find for other browsers and that’s almost perfect but doesn’t work in Safari

I’m trying to highlight things like “.co” “app.” Or “+44” these are often mid line so only wanting to highlight parts of elements.

Unfortunately I can’t upload an example of the page for privacy reasons, but would really appreciate and guidance, dumbed way down if possible.

Is Userscripts the right tool to even be looking at?


r/userscripts 13d ago

Seeking support in porting TeXMail-Gmail to work with Outlook.

2 Upvotes

I've recently been directing the development of TeXSend, which is intended to eventually be a suite of userscripts for adding LaTeX compiling to popular email services. Right now, TeXSend-Gmail is in a good place, and I'd like to port this over to work with Outlook.

The programmer who I've relied on for the majority of the coding for TeXSend-Gmail has some other responsibilities that they need to attend to for a while, and so will be unavailable to continue working on this. I'm hoping to find someone who is able to work on this port. I'm able to do testing and minor JS adjustments, but I'm far from a skilled JS programmer myself.

I need to clarify, this is non-profit work being distributed under an MIT license. As such, I cannot offer any compensation other than credit as a contributor. This is a suite that will hopefully prove beneficial to many people in STEM (academia in particular), and I hope that alone is sufficient encouragement for someone to volunteer.

Thank you.

Note: Title should have said "TeXSend". "TeXMail" was a working title.


r/userscripts 13d ago

Google Maps Reviews Scraper & Exporter

5 Upvotes

Google Maps Reviews Scraper & Exporter

This user script adds a floating panel to Google Maps place pages, allowing you to scrape and export reviews easily.

URL: https://greasyfork.org/en/scripts/510952-google-maps-reviews-scraper-exporter

Screenshot

Features

  • Floating panel for easy access
  • Auto-scrolling to load all reviews
  • Expansion of truncated reviews
  • JSON export of scraped data
  • Clipboard integration for quick copying

Usage

  1. Navigate to a Google Maps place page
  2. Click "Scrape Reviews" to gather all visible reviews
  3. Click "Copy to Clipboard" to export the data as JSON

Screenshot

Google Maps Reviews Scraper & Exporter in Action

Data Collected

For each review, the script collects:

  • Reviewer name
  • Profile Image URL
  • Review date
  • Star rating
  • Review URL
  • Full review content

Notes

  • This script is for educational purposes only
  • Be respectful of website terms of service and use responsibly
  • Large numbers of requests may be rate-limited by Google

Enjoy more accessible access to Google Maps review data with this handy user script!


r/userscripts 14d ago

Please help sending keystroke and a click in a loop

1 Upvotes

I have a very specific use case for a tampermonkey userscript. I need an inactive tab on my firefox browser to get a looping key presses and mouse clicks at a specific coordinate while I browse the net on another tab. Is this possible?

Obviously, this is for some idle game that I am running in a background tab while I do something else. Idle Wizard on kongregate is what I'm playing.

More specifically, the parameters I need are something like this.

Every 5 seconds: 1. Sends a mouse clicks on coordinates 830, 750. 2. Send keystroke arrow down. 3. Send keystroke b.

Loop this indefinitely until i disable it.

I tried to do it on AHK which has a simplified code that a random dude like me can understand, but I'm finding that AHK cannot really distinguish a specific firefox tab that is running in the background. As for userscript code system, it's way too complicated for me to understand without any programming knowledge.


r/userscripts 17d ago

Why does only this one shortcut work in a Gmail userscript?

2 Upvotes

Edit: Solved! See comments.

function addShortcuts() {
    const keyHandler = (e) => {
        if (e.shiftKey && e.code === 'KeyL') {
            toggleLatex()
        } else if (e.shiftKey && e.code === 'Slash') {
            waitForElement('body > div.wa:not(.aou) > div[role=alert]', 5).then(d => {
                const xpath = '//tr[th/text()="Formatting"]/following-sibling::tr';
                const row = document.evaluate(xpath, d, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
                const html = '<td class="wg Dn"><span class="wh">Shift</span> <span class="wb">+</span> <span class="wh">L</span> :</td><td class="we Dn">Toggle LaTeX</td>';
                row.innerHTML = html;
            });
        }
    }

    window.addEventListener('keypress', keyHandler);
}

I can make this "shift + [alphanumeric]", but nothing else actually works.

I'd particularly like like do "ctrl+alt+L".

The userscript in question: https://github.com/LoganJFisher/LaTeX-for-Gmail


r/userscripts 27d ago

[Request] MathJax for Gmail

2 Upvotes

Edit: This has gradually evolved into this project: https://github.com/LoganJFisher/LaTeX-for-Gmail?tab=readme-ov-file


I'm looking to find a way to add LaTeX equation rendering to Gmail in Firefox. Could someone create such a userscript please?

I've tried searching for Gmail add-ons, Firefox extensions, and userscripts (using Greasemonkey and ViolentMonkey). I even tried editing the MathJax for Reddit userscript by changing its @match URL to https://mail.google.com/*, but that didn't work (the script triggers, but doesn't solve the issue).

I just need a solution that can handle equations. I don't need it to be capable of rendering whole documents right in Gmail. I need it to be for Firefox though, not Chrome.

Example: If you look at the sidebar of /r/askphysics, you'll see this. If you install the userscript "MathJax for Reddit" that they recommend, you'll then instead see this. I want the same thing for sent and received emails viewed on https://mail.Google.com

I'm getting desperate and frustrated that my attempts keep failing ad I don't understand why.


r/userscripts 28d ago

FuckYou logo on YouTube

7 Upvotes

Replace the YouTube logo with a custom logo styled to resemble the original logo but with the text “FuckYou” or "Fuck YouTube".

Fuck YouTube - https://greasyfork.org/en/scripts/508890-youtube-logo

FuckYou - https://greasyfork.org/en/scripts/508696-you-logo-on-youtube


r/userscripts 27d ago

A custom channel remover for youtube using localStorage

0 Upvotes

https://termbin.com/o01j

If you want the buttons to look prettier you can edit the add_button function


r/userscripts Sep 13 '24

IMDB Movie - Watch any movie directly in IMDB

15 Upvotes

Tried making my first user script (i had few for personal use before), let me know if I made any mistakes or if this kind of scripts even allowed or not lol.

Link: https://greasyfork.org/en/scripts/508237-imdb-movie


r/userscripts Sep 12 '24

[Help] Instagram video control userscript.

1 Upvotes

r/userscripts Sep 07 '24

Any challenging scripts to write?

13 Upvotes

i'm bored and enjoy javascript challenges, if theres anyone who needs any scripts that are time-consuming or just difficult in general, send it over so i can have something to do


r/userscripts Sep 05 '24

Help with creating/installing custom user styles

1 Upvotes

I am a new MacBook user, trying to stick with Safari as my browser. In Windows, I used to customize a couple of web pages with Stylebot and Stylish. They had visual interfaces with an element picker, and didn't require any coding knowledge to use. The few apps/extensions I've seen for MacOS Safari don't seem to have that kind of interface; you have to know how to create the code.

My preference would be to use a GUI Safari extension, if one exists, to create my own style sheet, picking elements and previewing changes directly on the page. But if that's not possible, I'd be content with installing styles from other users. I have the Userscripts extension, and I've tried installing some scripts from the Greasy Fork site, but I can't seem to add them via the green "install" button per the instructions; that only brings up the page with the code. I've tried copying and pasting the code via the "create" function in Userscripts, while on the website I want to change. I've also tried the built-in stylesheet field in the advanced Safari settings, which seems like it might be a way to install styles without the use of a separate extension, but haven't had any luck with that. (Maybe it won't work for a per-site script?)

Any help would be appreciated.


r/userscripts Sep 02 '24

New 1337x Enhancement Userscript: Customizable

16 Upvotes

I'm excited to introduce a new userscript I've developed called 1337x - Combined Enhancements 2025 (v11) - Configurable. This script aims to enhance your browsing experience on the 1337x torrent site with various configurable features that improve both usability and aesthetics.

Download: https://greasyfork.org/en/scripts/483602-1337x-combined-enhancements-2025-v11-configurable

Screenshot:

Key Features:

  • Configurable Settings: A dedicated settings menu allows you to customize your experience. You can choose to show thumbnails, adjust the number of visible images, set fetch delays, and limit fetch retries.
  • Extra Column for Links: The script adds a column displaying direct torrent and magnet links, making it easier to find and download the content you want.
  • Title Extension: Page titles are modified for better clarity and information, giving you more context about the torrents you're browsing.
  • Image Enhancement: Automatically adds related images to torrent entries with the option to show more images. You can also see enlarged image previews on hover.
  • Full Width Layout: Option to expand the site layout for a more spacious and comfortable interface.
  • Lazy Load Image Fix: Corrects image URLs to show full-size images, ensuring you see the best quality images available.
  • Fetch Queue System: Optimizes performance by managing requests with adjustable delays and retry limits.
  • Popup Notifications: Real-time feedback for actions and errors, so you know what's happening at all times.

How to Install:

The script is available on GreasyFork and can be easily installed using Tampermonkey or other userscript managers. You can find it here: 1337x - Combined Enhancements 2025 (v11) - Configurable.

Feedback:

I'd love to hear your thoughts, suggestions, or any issues you encounter. Feel free to ask questions, post reviews, or report issues directly on GreasyFork or here in this thread.

Enjoy a more efficient and visually pleasing way to use 1337x!


r/userscripts Sep 01 '24

Anyone wanna contribute

2 Upvotes

I have been locally building it and finally released the prototype to Greasy Fork: https://greasyfork.org/en/scripts/506067-pluto-tv-m3u8-grabber


r/userscripts Aug 30 '24

Secure configuration against bad scripts

Thumbnail image
9 Upvotes

I am trying to harden the configuration to make it secure against bad scripts. Does the grant variable works as intended if I add it here? Are there other parameters that you use to make it secure? For example excluding any url with the word login or similar things

The idea is if a script dev account is stolen or something a malicious actor could modify de script to steal passwords or information.

What else could be done to avoid this?

I am using violentmonkey


r/userscripts Aug 30 '24

The Perfect Youtube Userscript Experience {keep the chain growing...}

18 Upvotes

How can we live with today's YouTube without the quality-of-life scripts...

 

hjk789's YouTube-Clickbait-Buster

used to 'peek' if the creator's video content actually matches that alluring thumbnail; does/n't do facecam or those stupid anime avatars; is/n't truly 'No Commentary'; Comments haven't (yet!) been infested by bot and trolls; and more!

 

Schegge's Block Youtube Users

as close as we're gonna get to a 'uBlock' for user accounts on YT.

Highly recommend changing the 'Separator' to a symbol that's less generic, e.g. ^.

You can even make pseudo-categories to group together blocked accounts e.g.

^ LIES_tellmesweetlittle_LIES^ True Story^ *audits^ *did you know ^ ANTI_scammers^ *Kitboga^ Jim Browning^ Scammer Payback

 

Pay it forward people - what other userscripts can you NOT live without on YT!


r/userscripts Aug 16 '24

Website for ui

5 Upvotes

I suck at making ui’s for Userscripts anyone knows a site where u make it there?


r/userscripts Aug 14 '24

Intercepting and changing xmlhttprequests

3 Upvotes

I'm sort of poking around learning more about JS and webdev (so far I know nothing 😅) and I recently came across xmlhttprequests which I thought were really quite cool. I want to make a sort of semi-automated scraper thing. Like maybe add a button to a page, and if you click it it'll grab some data from the page, and then send off the xhr request and... do something with the results. Maybe save it to a file or something, I haven't thought that far yet to be honest.

Could anyone help explain how I might do this? I have come across some of the specification on xhrs and it's still a bit dense for me to follow. And I'm also not sure how to translate all of that into something I could run from a userscript. I have Violentmonkey if that matters any.


r/userscripts Aug 01 '24

User script for passbolt website - increase width of left panel

1 Upvotes

I have a user script for the passbolt website. Initially it was supposed to be a user stylesheet, but somehow that stylesheet has no effect. I will post it all.

The annoying thing on that website is, that I cannot resize the left sidebar/panel. This requires me to have the browser window fullscreen, to be able to read all labels fully in the left panel. The left panel is a kind of folder tree, that lets you browse all the secrets you have access to. The silly styling of passbolt sets this left panel to a width of exactly 18%.

Here is my apparently ignored user stylesheet, which already tells what I want to achieve ultimately:

.page .panel.left {
    width: 24% !important;
}
.page .panel.middle {
    left: 24% !important;
    width: 76% !important;
}

This user stylesheet is also shown as "active" by the Stylus extension of Firefox, yet the set styles are not shown in the browser inspector, when I select the div that has the classes panel and left.

So I figured, that this is a shitty website, that requires me to use mutation observer and such, to wait until the site has fully loaded, because it might set style using JS. I searched around for a bit and found a solution for waiting until an element appears. At least I think it should work that way. I also added a maximum time, that it waits for the element to appear. Here is my code:

// ==UserScript==
// @name        New script passbolt.com
// @namespace   Violentmonkey Scripts
// @match       https://cloud.passbolt.com/*
// @grant       none
// @version     1.0
// @author      -
// @description 8/1/2024, 11:31:18 AM
// ==/UserScript==
const waitForElementTimerDuration = 10000;
function waitForElm(selector) {
    return new Promise((resolve, reject) => {
        // create a timer to wait for the element for a maximum duration
        const timeoutTimer = setTimeout(
            (selector) => {
                reject("element selected by", selector, "could not be found in time (", waitForElementTimerDuration, ")")
            },
            waitForElementTimerDuration,
            selector
        );
        // initially check, whether the element already exists
        if (document.querySelector(selector)) {
            // deactivate/disarm the timeoutTimer
            clearInterval(timeoutTimer);
            return resolve(document.querySelector(selector));
        }
        // create an observer, that checks for the element
        const observer = new MutationObserver((mutations) => {
            // if the element can be found stop observing and the timeoutTimer
            if (document.querySelector(selector)) {
                // deactivate/disarm the timeoutTimer
                clearInterval(timeoutTimer);
                // stop observing
                observer.disconnect();
                resolve(document.querySelector(selector));
            }
        });
        // If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336
        // start observing the whole document body for changes
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
}
const left_pane_width = 24;
const main_pane_width = 100 - left_pane_width;
const awaited_selector = ".panel.main .panel.left";
waitForElm(awaited_selector)
    .then((success) => {
        const main_panel = document.querySelector(".panel.main");
        const left_pane = main_panel.querySelector(".left");
        const middle_pane = main_panel.querySelector(".middle");
        left_pane.style.width = left_pane_width.toString().concat("%");
        middle_pane.style.width = (100 - left_pane_width).toString().concat("%");
        middle_pane.style.left = left_pane_width.toString().concat("%");
    })
    .catch((error) => {
        console.error("failed to find element with selector:", awaited_selector);
    });

Feel free to copy and use whatever you need, if you find it useful.

However, this doesn't seem to work. I always run into the timeout, as if the element never appeared. This is weird, because I can see the element in the browser inspector as <div class="panel left">. But document.querySelector(".panel.left") still returns null. I also don't understand, why my user stylesheet is not working, since it should always be active, regardless of how long the site takes to build its DOM or sets styles using script. It should at the very least be shown as strikedthrough rules in the inspector, but I don't see any of that.

Are they f'ing with the document.querySelector in weird ways? Or am I having a mistake somewhere?


r/userscripts Jul 27 '24

Shows images in OLD REDDIT comments rather than '<image>'. You can also click to expand the image!

8 Upvotes

i was so tired of seeing <image> everywhere, and needing to click it to view the image comments on Old Reddit, so I made this handy script! It replaces the link with the actual image and allows you to expand it upon clicking!! There is also a simple settings GUI that allows you to quickly and easily change the size of the images.

SCRIPT HERE

PICTURE EXAMPLE (before and after)


r/userscripts Jul 22 '24

Reklamfri utan anonymitet

1 Upvotes

Head: Ad-free but not necessarily anonymous

I don't want to see annoying ads anywhere, but at the same time, I want the apps that I use to be able to track me to improve their behavior and my user experience with that app. What kind of settings should I have?

Best regards.


r/userscripts Jul 21 '24

Request: Quizlet

1 Upvotes

I have been using a userscript for Quizlet but now recently they changed their functionality does anyone have a recently updated script for Quizlet.com


r/userscripts Jul 21 '24

Request new script for wps 365

0 Upvotes

Hi Good day, it will be possible for someone to help me with a Script to download the pdf documents from the WPS 365 site (wps.com)

The idea is to add a button that downloads the document in pdf without so much click


r/userscripts Jul 16 '24

Hide Replies on Twitter/X

1 Upvotes

Is there a solution for, just in general, hiding all replies to tweets on Twitter? I've tried browsing around sources like greasyfork or userscripts but haven't had much luck. I also experimented with custom css for the site but wasn't able to hide the reply sections.

If not, is this something that could be made within reason?


r/userscripts Jul 15 '24

Request: batch download X/Twitter userprofile media tab content

2 Upvotes

Images and videos batch download.

Anyone interested of coding?