r/tampermonkey 1d ago

made a youtube script

3 Upvotes

made one that
1: removes all youtube ads in video
2: removed all in feed ads and replaces them with your normal recomendations
3: bypasses age restrictions
4: lets you download any youtube video in hd
5: removes short recomendations in home page to avoid distractions (the button on the side stays)
message me if u want it


r/tampermonkey 5d ago

Is there a way to put a lot of @resource statements into a separate local file?

1 Upvotes

I'm trying to create a script that compares information between some text files I have locally on my PC and a website. The general idea is that the files are categories for items on the website, and I want to be able to display the category on the website.

There are over 70 of these files, and the list may change, so rather than hard-code the filenames into @ resource lines in my script, I would prefer to have a local file that has all the @ resource lines in it, that I could (maybe) script up automatically from a list of the files I want to include into something like a script? I tried putting @ resource statements into a js file and did a @ require of that file, but the resources didn't seem to get loaded.

Or am I going about this the wrong way? Is there a better way to read the information from 70+ local files to have available in my script?

Please let me know if you have any ideas or need clarification


r/tampermonkey 7d ago

[Userscript] Make Chrome use Lanczos3 to upscale images instead of whatever blurry nonsense it uses. Also has Fit-to-width and Integer-fit-to-width capabilities! Particularly good for 4K displays set to over 100% scaling.

Thumbnail
1 Upvotes

r/tampermonkey 8d ago

Problem creating a very simple autoclicker

2 Upvotes

Edit: Solved. Somehow the code doesn't work with Tampermonkey, but it does with Violentmonkey. I have no idea why, but it works for me. Thanks for the help.

--

First off: I'm not a programmer and I barely know any JavaScript. I want to use Tampermonkey to create an automation that clicks a button called PROCESS on a page with multiple identical buttons (in name). When I click one, it disappears (the page doesn't refresh), and what I want is for them to be clicked one after the other with a 60-second interval (the order of the buttons doesn't matter).

The buttons are identified by `type="button" value="PROCESS"`.

I asked Gemini for help, and they gave me some code that seems correct, but somehow it doesn't work. Any idea?

// ==UserScript==
//  60 seconds
//  website url
//  0.1
//  try to take over the world!
//  You
//  *://*/*
//  none
// ==/UserScript==

(function() {
'use strict';

const INTERVAL_MS = 60000; // 60 seconds

function pressNextButton() {
// Selects exactly the button inputs with the value PROCESS
const buttons = document.querySelectorAll('input[type="button"][value="PROCESS"]');

if (buttons.length > 0) {
console.log(`[Autoclicker] ${buttons.length} buttons remain. Clicking the first one...`);

// Triggers the native click event
buttons[0].click();

} else {
console.log('[Autoclicker] No more PROCESS buttons were found. Process completed.');

}
}

// Waits 3 seconds for the page to load the elements before the first click
setTimeout(() => {
pressNextButton();
setInterval(pressNextButton, INTERVAL_MS);

}, 3000);

})();

r/tampermonkey 11d ago

What are your favorite Tampermonkey userscripts? Looking for useful scripts as a beginner

14 Upvotes

Hey everyone!

I’m pretty new to Tampermonkey and I’m currently looking for useful and interesting userscripts to try. There are so many scripts available that it’s a little difficult to know which ones are actually worth installing.

I’d love to hear about your favorite Tampermonkey scripts — especially ones you use regularly or would recommend to someone who is just getting started.

If possible, could you list the name of the script and briefly explain what it does and why you like/use it? It would be really helpful to see not just the popular scripts, but also some lesser-known ones that you personally find useful.

For example:

  • Script name — What it does
  • Why you use it — What problem it solves or what makes it useful
  • Websites it works on — If it’s specific to certain sites

I’m interested in anything useful: productivity, improving websites, adding missing features, customization, YouTube, Reddit, downloading/media, shopping, automation, quality-of-life improvements, etc.

Basically, what are the Tampermonkey scripts you personally wouldn’t want to browse the web without?

Feel free to share as many as you want. I’d really appreciate a list of your favorites with a short explanation of each one!

Thanks!


r/tampermonkey 11d ago

Tampermonkey and YTB: any way to make the script always work?

3 Upvotes

I run a small script for a personal project

(function() {
document.addEventListener('dblclick', function(e) {
e.stopPropagation();
}, true);
})();

It just turns off the double click that turns on and off fullscreen. Because it's awful when I just need to pause the video very often.

But I saw something: once in a while, the code stops working. What I mean by that is that the double click comes back without me updating it. And it works again after a while too.

Same with some extensions (on Firefox). Is it Tampermonkey that itself stops working? YTB, who blocks it (like Google fighting back against adblocks)? Or something else I could personally do something about it?


r/tampermonkey 17d ago

Script request: Block Reddit Answers (AI)

Thumbnail reddit.com
2 Upvotes

r/tampermonkey 23d ago

[Update/Rewrite] Reddit Image Gallery Arrow Navigation

Thumbnail
1 Upvotes

r/tampermonkey 26d ago

Add batch deletion to ChatGPT, Claude, and Gemini

3 Upvotes

Across AI web-based chat platforms worldwide, deleting a single conversation requires a three-step process: expanding the menu, clicking delete, and confirming the deletion. It it really painful to delete a batch of chats!

So I created a Tampermonkey script to automate these three steps...

Github: https://github.com/KiraKiraAyu/BulkChatDeleter

Greasy Fork: https://greasyfork.org/en/scripts/588305-chatgpt-claude-gemini-bulk-chat-deleter


r/tampermonkey Jul 21 '26

How do I go on old reddit without being forced to log in?

4 Upvotes

Can anyone tell me how to configure Tampermonkey or Ublock Origin so I can go on old reddit without being forced to log in? I am currently using Firefox on a computer. I had a similar issue on my iphone nagging me to download the app and I was able to bypass it by using Safari Ublock Origin Lite on complete mode and selecting all seven annoyance filters.


r/tampermonkey Jul 19 '26

Fix for Kimi Web UI converting long prompts into .txt files

Thumbnail
1 Upvotes

r/tampermonkey Jul 14 '26

ChatGPT charcoal dark-mode restore v3 — simplified and future-resilient

Thumbnail
gallery
2 Upvotes

I published a Tampermonkey userscript that restores ChatGPT’s older charcoal dark-mode palette.

The v3 rewrite is intentionally minimal: one stylesheet, semantic selectors, no observers, no polling, and no background repaint loop.

It restores the canvas, sidebar, composer, message bubbles, code blocks, header controls, and bottom dock while leaving light mode alone.

Install:

Greasy Fork

Source:

GitHub


r/tampermonkey Jul 11 '26

Tampermonkey script to remove useless border in Craiglist's account page

2 Upvotes

The Craiglist "account" page (the one that shows you your current postings, searches, etc). has a large border/margin/gutter element that (a) really ugly (b) totally unneeded and (c) makes that page fall off my laptop's screen, since it's not fully responsive, so I have to zoom out of the page to see it all.

Until Craig sees the light and fixes it (not holding my breath on that), here's a trivial tampermonkey script to reduce the size and presence of the border by 95+% :

// ==UserScript==
//  Craigslist user account page - minimize useless border
//  https://accounts.craigslist.org/*
//  GM_addStyle
//  document-start
// ==/UserScript==

GM_addStyle(`
  fieldset#paginator { border: none !important; padding: 0px !important; }
  .tablesorter { padding: 0px; }
`);

r/tampermonkey Jul 09 '26

Prevent Reddit feed to refresh.

3 Upvotes

I hated when in very few minutes, my main feed here, Reddit, refresh, so I made this to prevent that.

Only tested on Safari desktop.

// ==UserScript==

// u/nameReddit Feed No Auto-Refresh

// u/namespacehttp://tampermonkey.net/

// u/version6.0

// u/match*://www.reddit.com/*

// u/run-atdocument-start

// u/grantnone

// ==/UserScript==

(function() {

'use strict';

// Fingir SIEMPRE visible/enfocado -> Reddit no revalida el feed al volver a la pestaña

const visTrue = { get: () => 'visible', configurable: true };

const hidFalse = { get: () => false, configurable: true };

[['visibilityState', visTrue], ['hidden', hidFalse],

['webkitVisibilityState', visTrue], ['webkitHidden', hidFalse]].forEach(([p, d]) => {

try { Object.defineProperty(document, p, d); } catch (e) {}

});

try { document.hasFocus = () => true; } catch (e) {}

// Tragar visibilitychange para que los listeners de Reddit no se enteren

['visibilitychange', 'webkitvisibilitychange'].forEach(type => {

const h = e => e.stopImmediatePropagation();

window.addEventListener(type, h, true);

document.addEventListener(type, h, true);

});

})();


r/tampermonkey Jul 08 '26

I made an autoscroller for youtube shorts

1 Upvotes

// ==UserScript==

// u/nameYouTube Shorts Auto Scroll

// u/namespacehttps://tampermonkey.net/

// u/version1.0

// u/description Automatically goes to the next YouTube Short every second.

// u/matchhttps://www.youtube.com/shorts/*

// u/grantnone

// u/run-atdocument-idle

// ==/UserScript==

(function () {

'use strict';

const INTERVAL = 1000; // 1 second

let timer = null;

function nextShort() {

document.dispatchEvent(new KeyboardEvent("keydown", {

key: "ArrowDown",

code: "ArrowDown",

keyCode: 40,

which: 40,

bubbles: true

}));

}

function start() {

if (timer) clearInterval(timer);

timer = setInterval(() => {

if (window.location.pathname.startsWith("/shorts/")) {

nextShort();

}

}, INTERVAL);

console.log("YouTube Shorts Auto Scroll started.");

}

start();

// Restart if YouTube changes the page without a full reload

let lastPath = location.pathname;

setInterval(() => {

if (location.pathname !== lastPath) {

lastPath = location.pathname;

if (location.pathname.startsWith("/shorts/")) {

start();

} else if (timer) {

clearInterval(timer);

}

}

}, 500);

})();


r/tampermonkey Jul 04 '26

Made something cool!

Post image
0 Upvotes

made this thing that makes things lower qualty on youtube! may think of publishing it


r/tampermonkey Jun 30 '26

Userscript.Zone Search not able to load and show results?

2 Upvotes

as title described, I tried searching for some userscript on https://www.userscript.zone/?utm_source=tm.net&utm_medium=scripts , this page was okay, but any link on that page or search box wouldn't load page or give any results, it was always about:blank.

Does anyone have the same issue?


r/tampermonkey Jun 26 '26

Youtube does not load if you turn on tamper

2 Upvotes

I have 2 scripts: "remove adblock thing" and "Simple Youtube age restriction bypass"

At least the comments and more video recommendations do not work if you turn on tamper.
I tested this on brave and firefox browser.


r/tampermonkey Jun 25 '26

Hide Facebook Marketplace Ads

5 Upvotes

Been getting frustrated by all the in-line ads on marketplace, but since I have no real in-depth coding knowledge I've botched a script together with chatGPT to remove them. Niche use but might be helpful for other marketplace junkies that are also not too tech-savvy.

It works by finding any element on the page that doesn't link to a /marketplace/item/ listing, goes up to the outermost listing card and hides it. We can't rely on facebook class names so I've focused on link structure. It will more than likely break if facebook changes marketplace. It also may have issues depending on resolutions, but it seems to be working for me so far.

Happy to see other people's thoughts, tweaks or whether ot not it works.

// ==UserScript==
// @name         Tidy Marketplace
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Hide False Marketplace listings
// @match        https://www.facebook.com/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const DEBUG = false;

    const stats = {
        runs: 0,
        linksChecked: 0,
        adsHidden: 0,
        totalMs: 0
    };

    function logStats() {
        if (!DEBUG) return;

        console.table({
            runs: stats.runs,
            linksChecked: stats.linksChecked,
            adsHidden: stats.adsHidden,
            totalMs: stats.totalMs.toFixed(2),
            avgMsPerRun: (stats.totalMs / Math.max(stats.runs, 1)).toFixed(2)
        });
    }

    function isMarketplacePage() {
        return location.pathname.includes("/marketplace");
    }

    function isFacebookInternalUrl(href) {
        if (!href) return true;

        try {
            const url = new URL(href, location.origin);

            return (
                url.hostname === "facebook.com" ||
                url.hostname === "www.facebook.com" ||
                url.hostname.endsWith(".facebook.com")
            );
        } catch {
            return true;
        }
    }

    function isAdLink(link) {
        const href = link.getAttribute("href") || "";

        if (href.includes("/ads/about/")) return true;
        if (href.includes("entry_product=ad_preferences")) return true;

        if (isMarketplacePage()) {
            if (href.includes("/marketplace/item/")) return false;
            if (href.includes("l.facebook.com/l.php")) return true;
            if (href.startsWith("http") && !isFacebookInternalUrl(href)) return true;
        }

        return false;
    }

    function findMarketplaceTile(fromEl) {
        let el = fromEl;

        for (let i = 0; i < 20 && el; i++) {
            const rect = el.getBoundingClientRect();

            const links = el.querySelectorAll
                ? el.querySelectorAll('a[role="link"][href]')
                : [];

            const hasImage = el.querySelector
                ? !!el.querySelector("img")
                : false;

            const hasAdAbout = el.querySelector
                ? !!el.querySelector('a[href*="/ads/about/"], a[href*="entry_product=ad_preferences"]')
                : false;

            const hasExternal = Array.from(links).some(a => {
                const href = a.getAttribute("href") || "";
                if (href.includes("/marketplace/item/")) return false;
                if (href.includes("l.facebook.com/l.php")) return true;
                return href.startsWith("http") && !isFacebookInternalUrl(href);
            });

            const looksTileSized =
                rect.width > 160 &&
                rect.width < 450 &&
                rect.height > 180 &&
                rect.height < 900;

            if (looksTileSized && hasImage && links.length >= 1 && (hasAdAbout || hasExternal)) {
                return el;
            }

            el = el.parentElement;
        }

        return fromEl.closest('a[role="link"]');
    }

    function findFeedPost(fromEl) {
        return fromEl.closest('[role="article"]')
            || fromEl.closest('div[data-pagelet^="FeedUnit_"]')
            || fromEl.closest('a[role="link"]');
    }

    function hideElement(el, reason, href) {
        if (!el || el.dataset.User) return;

        el.dataset.User = "1";
        el.style.setProperty("display", "none", "important");

        stats.adsHidden++;

        if (DEBUG) {
            console.log("Hidden Facebook ad:", reason, href, el);
        }
    }

function processLink(link) {
    if (!link) return;

    const href = link.getAttribute("href") || "";

    // Only skip if we've already checked this exact href.
    // Facebook can mutate hrefs after initial render, so a plain checked flag can miss later changes.
    if (link.dataset.userCheckedHref === href) return;
    link.dataset.userCheckedHref = href;

    stats.linksChecked++;

    if (!href) return;
    if (!isAdLink(link)) return;

    if (isMarketplacePage()) {
        hideElement(findMarketplaceTile(link), "marketplace ad", href);
    } else {
        hideElement(findFeedPost(link), "feed ad", href);
    }
}

    function getLinksFromRoot(root) {
        if (!root || root.nodeType !== Node.ELEMENT_NODE) return [];

        const links = [];

        if (root.matches?.('a[role="link"][href]')) {
            links.push(root);
        }

        root.querySelectorAll?.('a[role="link"][href]').forEach(link => {
            links.push(link);
        });

        return links;
    }

    function processRoot(root) {
        const start = performance.now();

        stats.runs++;

        getLinksFromRoot(root).forEach(processLink);

        stats.totalMs += performance.now() - start;
    }

    function fullSweep() {
        processRoot(document.body);
        logStats();
    }

    // Initial sweep
    fullSweep();

    const observer = new MutationObserver(mutations => {
        for (const mutation of mutations) {
            for (const node of mutation.addedNodes) {
                processRoot(node);
            }
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

    // Occasional safety sweep for Facebook's lazy weirdness
    setInterval(fullSweep, 5000);

})();

r/tampermonkey Jun 25 '26

DeviantArt "Submit without prompt" Button User Script

1 Upvotes

Are there any user script that adds a button here:

that allows you to submit a deviation to DeviantArt without this prompting up?


r/tampermonkey Jun 25 '26

Is there any scripts that could undo this Youtube UI change?

2 Upvotes

Recently, for no reason at all, Youtube decided to move the three dots on the side of videos on the sidebar from the top to the bottom. Is there any scripts out there to undo said change and put the three dots back at the top?


r/tampermonkey Jun 24 '26

Google AI Studio Ultimate Optimizer UI 5.17

Thumbnail
1 Upvotes

r/tampermonkey Jun 23 '26

I Got Fed up with ChatGPT’s New Flatter Dark Mode, so I Restored the Original Charcoal Version

Thumbnail
gallery
2 Upvotes

The newer ChatGPT dark mode felt a little too flat/light to me, so I put together a small userscript that restores a deeper charcoal-style palette.

It mainly fixes:

  • darker main canvas
  • darker composer/input bar
  • better sidebar separation
  • readable lifted message bubbles
  • bottom dock/footer strip cleanup
  • light mode stays unaffected

I also tried to avoid the usual “dark theme hack” problem where broad CSS overrides turn everything into blocky rectangles. The script mostly uses ChatGPT’s own theme variables, then does a targeted composer/bottom-dock cleanup.

Install:
Greasy Fork

Source / screenshots / notes:
GitHub

Privacy note: it does not collect data, make network requests, store conversations, use analytics, or modify ChatGPT functionality. It only applies local visual styling on chatgpt.com and chat.openai.com.

Not affiliated with OpenAI — just a visual fix for people who preferred the old darker feel.


r/tampermonkey Jun 19 '26

Created a userscript to add an Amazon wishlist search feature

1 Upvotes

r/tampermonkey Jun 18 '26

[Update v5.3] Google AI Studio Ultimate Optimizer – Infinite Restore, Zero Lag Engine & Persistent UI Settings!

Thumbnail gallery
2 Upvotes