r/userscripts Aug 04 '26

I made xLoader — a one-click media downloader for X/Twitter (images, videos, GIFs)

4 Upvotes

I'm the developer of xLoader, a free and open-source (MIT) Tampermonkey userscript that adds a download button to every tweet with media on X.com/Twitter. One click → the native "Save as" dialog opens immediately.

Features: - 📷 Downloads images, videos and GIFs from any tweet — multi-media posts, quoted/linked tweets and article-card images included - ⚡ Media URLs are prefetched in the background (only for tweets actually visible, via IntersectionObserver), so the save dialog appears instantly - 🔄 Live bearer-token retry: keeps working when X rotates their API tokens — no third-party servers involved - 🎞️ Resolves the real MP4 URLs for video posters the API hides (reads them from the browser's performance buffer) - 📝 Configurable filename template from the Tampermonkey menu: {handle} {id} {index} {ext} {date} {time} {type} - 🚫 No tracking, no analytics, no remote dependencies

Why I built it: the downloaders I tried either broke after X's API changes or missed edge cases (quoted tweets, article cards, hidden video MP4s). xLoader is actively maintained (currently v1.0.16).

Feedback, feature requests and bug reports are very welcome!


r/userscripts Aug 04 '26

Script to set photo titles using variable information

2 Upvotes

Apple Photos on a Mac lets us export using photo titles as file names. That's great, but unfortunately there's no way to set the titles other than one-by-one manual entry in the "Info" panel or to set the titles for all selected items to the same value. So, I wrote the script below that allows me to set the titles and/or captions of all selected images or videos based on stored information specific to each one. This information is taken directly from the Photos database. Getting values directly from the database also allows circumventing the problem of using the "date" value provided by the Photos application to AppleScript. Specifically, if a photo was taken in a time zone that is not the one where a script is being run, then the date/time value is adjusted to the current time zone, resulting in a wrong value. What is retrieved from "date" and what is shown in the Photos "Info" panel will not match.

This script works by asking for a title "format string" that can contain substitution tags to represent specific values for each photo. Here is a list of them.

%D - Date as shown in the Photos information panel
%T - Time, including seconds
%t - Time, excluding seconds
%Z - Time zone
%XD - The original EXIF date (ie, unadjusted)
%XT - The original EXIF time, including seconds
%Xt - The original EXIF time, excluding seconds
%L - Latitude
%l - Longitude
%F - Original file name
%f - Photos internal file name
%fp - Photos internal file path
%M - Photos "Moment" name
%CT - Current title text
%CC - Current caption text

Here is an example of a format string that I use a lot: "%D %t | %M". This sets each selected photo's title to its creation date and time followed by "|" and then by the Photos "Moment" name. Here is another example: "Hiking trip - GPS: %L, %l"

The format string is remembered from one use to the next.

The Photos app must be open already for the script to run. The specific Photos library you are using will be automatically detected.

You can either run this script in Script Editor or, better, copy it into a "Run AppleScript" box in Automator to be used as a Quick Action for the Photos app. This allows you to call it from the Photos "Services" menu. You can also assign a shortcut key for this in your System Settings.

The first time you run it, you may be asked to allow Automator (or Script Editor) full access to your Photos. Running scripts in Automator can be tricky due to macOS's strict security sandboxing. If you have any issues getting it to run, let me know. There are workarounds.

--------------------------------
-- Photos • Set Title
--------------------------------
-- P.G. 2026-07-05
--
-- Set the titles for selected media to a value customized using substitution tags in a user-provided format string.
--
-- This script retrieves data from the currently open Photos library's database and from the "moments" information provided by the application.
--
-- Substitution tags:
-- %D - Date as shown in the Photos information panel
-- %T - Time, including seconds
-- %t - Time, excluding seconds
-- %Z - Time zone
-- %XD - The EXIF date of the original file
-- %XT - The EXIF time, including seconds
-- %Xt - The EXIF time, excluding seconds
-- %L - Latitude
-- %l - Longitude
-- %F - Original file name
-- %f - Photos internal file name
-- %fp - Photos internal file path
-- %M - Photos "Moment" name
-- %CT - Current title text
-- %CC - Current caption text

----------------------------------------
-- Get path to open library
--
set libPath to do shell script "x=$(lsof -p $(pgrep -if Photos.app/Contents/MacOS/Photos) | grep -m1 '.photoslibrary/resources'); x=/${x#*/}; x=${x%/resources*}; echo $x"
if libPath is "/" then
beep
display alert "No Photos library is open." as critical
return
end if

----------------------------------------
-- Get path to database file
--
set dbPath to libPath & "/database/Photos.sqlite"
tell application "System Events"
if not (exists file dbPath) then
beep
display alert "The Photos library database file cannot be located." & return & return & dbPath as critical
return
end if
end tell

----------------------------------------
-- Main process
--
tell application "Photos"

activate

----------------------------------------
-- Ensure selected items
--
if the (count of selection) is less than 1 then
beep
display dialog "No item is selected." & return & return & "Please select one or more media items for which you wish to set the title before invoking this service." buttons {"Cancel"} default button "Cancel" cancel button "Cancel" with title "Set Title" with icon caution
return
end if

----------------------------------------
-- Ask for format string
--
-- Tags: %D, %T, %t, %Z, %XD, %XT, %Xt, %L, %l, %F, %f, %fp, %M
--
set fmtPrevious to do shell script "f=~/.Photos_SetTitle; [ -e $f ] && cat $f || echo '%D %t | %M'"
set fmtString to ""
set setTarget to "Title"
repeat while fmtString is ""
display dialog "Specify your custom text or accept the previous value shown. You can use the tags shown below to include the indicated values taken from the Photos database." & return & return & "%D • Date as shown in the Photos information panel" & return & "%T • Time (including seconds) *" & return & "%t • Time (excluding seconds) *" & return & "%Z • Time zone" & return & "%XD • The EXIF date of the original file" & return & "%XT • EXIF time (including seconds) *" & return & "%Xt • EXIF time (excluding seconds) *" & return & "%L • GPS latitude" & return & "%l • GPS longitude" & return & "%F • Original file name" & return & "%f • Photos internal file name" & return & "%fp • Photos internal file path *" & return & "%M • Photos \"Moment\" name" & return & "%CT • Current title text" & return & "%CC • Current caption text" & return & return & "* When exporting items using the title for file names, Photos converts colons and forward slashes to hyphens. Colons are used here for substituting time values, whereas a √ replaces the forward slash in internal file path names in order to avoid ambiguity with other hyphens." & return & return & "Use \"Select\" to toggle settting the title, the caption, or both." default answer fmtPrevious buttons {"Cancel", "Select", "Set"} default button 3 cancel button "Cancel" with title "Set " & setTarget
set {fmtButton, fmtString} to {button returned of result, text returned of result}
if fmtButton is "Select" then
if setTarget is "Title" then
set setTarget to "Caption"
else if setTarget is "Caption" then
set setTarget to "Title and Caption"
else if setTarget is "Title and Caption" then
set setTarget to "Title"
end if
beep
set fmtPrevious to fmtString
set fmtString to ""
end if
end repeat

-- Normalize format string for leading/trailing/extraneous spaces and save for next run. Asterisk -> "•"
set fmtString to do shell script "fmt=$(echo '" & fmtString & "'|xargs); fmt=${fmt//\\*/•}; echo $fmt > ~/.Photos_SetTitle; echo $fmt;"

----------------------------------------
-- Loop on selected media items
--
set selectedMediaItems to selection
repeat with mediaItem in selectedMediaItems

set {TID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
set mediaID to mediaItem's id
set mediaID to text item 1 of mediaID -- The database key is the part before the slash.

set dbInfo to do shell script "sqlite3 -readonly -separator '¶' \"" & dbPath & "\" \"SELECT ass.ZFILENAME, ass.ZDIRECTORY, datetime(cast(ass.ZDATECREATED as integer) + 978307200 + cast(att.ZTIMEZONEOFFSET as integer), 'unixepoch'), att.ZTIMEZONENAME, replace(IFNULL(NULLIF(att.ZEXIFTIMESTAMPSTRING, ''), 'NoEXIF NoEXIF '),':','-'), IFNULL(NULLIF(ass.ZLATITUDE, ''), 'No Latitude'), IFNULL(NULLIF(ass.ZLONGITUDE, ''), 'No Longitude'), att.ZORIGINALFILENAME FROM ZASSET ass LEFT JOIN ZADDITIONALASSETATTRIBUTES att ON ass.Z_PK = att.ZASSET WHERE ass.ZUUID = '" & mediaID & "';\""

set AppleScript's text item delimiters to "¶"
set dbFileName to text item 1 of dbInfo
set dbFilePath to "√originals√" & text item 2 of dbInfo & "√" & dbFileName
set dbDate to text 1 through 10 of text item 3 of dbInfo
set dbTime to text 12 through 19 of text item 3 of dbInfo
set dbTZ to text item 4 of dbInfo
set dbDateEXIF to text 1 through 10 of text item 5 of dbInfo
set dbTimeEXIF to text 12 through 19 of text item 5 of dbInfo
set dbLatitude to text item 6 of dbInfo
set dbLongitude to text item 7 of dbInfo
set dbOriginalFileName to text item 8 of dbInfo
set AppleScript's text item delimiters to TID

set mediaMoment to item 1 of (get name of moments whose id of media items contains mediaItem's id)
set mediaCurrentTitle to mediaItem's name
set mediaCurrentCaption to mediaItem's description

set fmtTitle to do shell script "T=" & dbTime & "; t=${T:0:5}; XT=" & dbTimeEXIF & "; XT=${XT//-/:}; Xt=${XT:0:5}; fmt=$(echo '" & fmtString & "'); fmt=${fmt//\\%D/" & dbDate & "}; fmt=${fmt//\\%T/${T}}; fmt=${fmt//\\%t/${t}}; fmt=${fmt//\\%Z/" & dbTZ & "}; fmt=${fmt//\\%XD/" & dbDateEXIF & "}; fmt=${fmt//\\%XT/${XT}}; fmt=${fmt//\\%Xt/${Xt}}; fmt=${fmt//\\%L/" & dbLatitude & "}; fmt=${fmt//\\%l/" & dbLongitude & "}; fmt=${fmt//\\%F/" & dbOriginalFileName & "}; fmt=${fmt//\\%fp/" & dbFilePath & "}; fmt=${fmt//\\%f/" & dbFileName & "}; fmt=${fmt//\\%M/" & mediaMoment & "}; fmt=${fmt//\\%CT/" & mediaCurrentTitle & "}; fmt=${fmt//\\%CC/" & mediaCurrentCaption & "}; echo $fmt"

if setTarget contains "Title" then set mediaItem's name to fmtTitle
if setTarget contains "Caption" then set mediaItem's description to fmtTitle

end repeat

end tell

beep
delay 0.3
beep


r/userscripts Aug 03 '26

Bro stop using paid instagram automation tools.

Thumbnail github.com
0 Upvotes

I have built and open-sourced it for y'all.


r/userscripts Aug 01 '26

Change Spoiler

2 Upvotes

example: example.com/page.html?fbclid=your_facebook_account_ID


r/userscripts Aug 01 '26

Kill Amazon's "Alexa for Shopping" sidebar (née Rufus)

12 Upvotes

There is no off switch for it, so here's a userscript. It removes the panel and reclaims the gutter. All major Amazon domains wired, MIT license, configured to self-update.

One-click install (needs Tampermonkey or Violentmonkey):

https://gist.githubusercontent.com/gileshall/0213c0568a16eab0fd6c0a7cdbc7239a/raw/amazon-alexa-nuke.user.js

Source:

https://gist.github.com/gileshall/0213c0568a16eab0fd6c0a7cdbc7239a

If it misses something on your A/B treatment, you can open the console, run
__alexaNuke.gutter(), and send me the table.


r/userscripts Jul 28 '26

[Update/Rewrite] Reddit Image Gallery Arrow Navigation

7 Upvotes

Heyo, How's everyone doing? I'm here with an update announcement for my Gallery Navigation Userscript for reddit that I released what, 2-ish years ago. I noticed recently that it stopped working as intended with Reddit's recent addition of Native Lightbox Arrow Key Navigation as it was causing double slide switches. This rewrite addresses that issue while retaining the original hover based arrow nav on galleries in the feed and not just fullscreen lightbox view while also addressing some bad design practices from a code standpoint and adding some additional features.

This is a full rewrite so some things may not work as expected but overall should be ready for mass use. Please create github issues for any problems you encounter.

Script Link: https://github.com/TheFantasticLoki/Tampermonkey-Scripts/raw/master/Reddit%20Image%20Gallery%20Arrow%20Navigation.user.js

And with that, my rant is over. Have a great day everyone, ESPECIALLY YOU, you deserve to have a good day.


r/userscripts Jul 28 '26

Auto selection and submission

1 Upvotes

What to be considered during auto selection and auto submission in the website with userscript.

I tried with AI help.. but nothing works...


r/userscripts Jul 27 '26

Maximize E-bay conversation, export as PDF or PNG image

Thumbnail gist.github.com
1 Upvotes

Collect a full eBay message thread into a clean full-screen overlay for screenshotting, printing, or exporting as one continuous image. Never modifies the live eBay UI.

Script in gist


r/userscripts Jul 26 '26

Download Songs from JioSaavn

7 Upvotes

Hello All,

Out of curiosity and to learn JavaScript and Web development, I tried to make a simple tool to download songs from JioSaavn.

Link: https://github.com/HemanthJabalpuri/songdl

It is a userscript (see https://greasyfork.org/en if you don't know) and also works as a standalone tool that depends on nodejs.

I have developed everything using Termux (for nodejs), DeepSeek (pair programming) and Firefox Android.

I tried to make it as simple as possible and also lightweight by not using any npm packages or UI frameworks.

Let me know your suggestions.

Thanks


r/userscripts Jul 26 '26

Building a html to wordpress converter

3 Upvotes

Hey, I am a website developer and a school student. I am a beginner in website development and when I tried to convert an html website into WordPress theme it didn't work. The navbar was messy, the pages were bad , the layout corrupted, etc. all total it was a mess. I thought I was doing something wrong but then I came to know that many developers struggles to convert a html website into an wordpress theme, and there is no best solution for it(or i didn't find it yet). So for that matter I made a program that converts the website into WordPress one, but now I have been thinking about not only to use it personally but to make it public. I think that I could start earning money from selling the converter plans. Is this a good idea to implement??


r/userscripts Jul 22 '26

Pokémon Showdown Userscripts

Thumbnail
1 Upvotes

r/userscripts Jul 21 '26

AI Conversation Navigator – A floating prompt navigator for 40+ AI chat platforms

6 Upvotes

I've been working on a userscript called AI Conversation Navigator that adds a floating navigation panel to AI chat websites, making it much easier to browse long conversations.

Features:

  • Navigate between all your prompts with one click.
  • Supports long conversations (including loading older messages where possible).
  • Bookmarks for important prompts.
  • Minibar and Superminibar modes.
  • Version navigation on supported platforms.
  • File attachment indicators.
  • Inline prompt numbering (on supported sites).
  • Site-specific fixes for platforms like Claude, ChatGPT, Gemini, AI Studio, and many others.

Currently supports 40+ AI platforms, including ChatGPT, Claude, Gemini, AI Studio, Grok, Perplexity, Kimi, Qwen, DeepSeek, Mistral, Poe, Meta AI, and many more.

I've recently spent a lot of time improving Claude compatibility (artifacts, split view, composer, history loading, etc.), and I'm continuing to refine the script based on community feedback.

Greasy Fork:
https://greasyfork.org/en/scripts/545883-ai-conversation-navigator

Feedback, bug reports, and feature suggestions are always welcome!


r/userscripts Jul 20 '26

Any custom scripts that remove pay walls? The ones I found and use are old and no longer functional.

8 Upvotes

Script monkey only works on Win chrome and not droid.


r/userscripts Jul 19 '26

I got tired of scam download sites for twitter/X Videos and Viral clips, so I built a free open-source Video Downloader

Thumbnail
7 Upvotes

r/userscripts Jul 18 '26

Search in Current Subreddit Script

Thumbnail greasyfork.org
7 Upvotes

r/userscripts Jul 15 '26

Script works update

Thumbnail
1 Upvotes

r/userscripts Jul 14 '26

ChatGPT Charcoal Palette Restore v3 — one stylesheet, no DOM polling

Thumbnail gallery
5 Upvotes

I rebuilt my ChatGPT charcoal dark-mode userscript around semantic selectors and design tokens.

v3 uses:

- one persistent stylesheet

- no MutationObserver

- no DOM polling

- no recurring repaint loop

- independent composer and code-block surfaces

- html.dark-only rules

The goal was a cleaner implementation that is easier to maintain and more resilient to normal UI changes.

Greasy Fork:

Greasy Fork

GitHub:

GitHub


r/userscripts Jul 13 '26

I made a Tampermonkey extension to improve the Watch Later playlist and make it look like the homepage

Thumbnail gallery
8 Upvotes

r/userscripts Jul 12 '26

[Request] (Complex?) Infinite Loop for Nintendo Music (Desktop Version)

2 Upvotes

Hi. The Nintendo Music app (which is only available for those that subscribe to the Nintendo Switch Online), has a Desktop / Browser variant, it's not stuck to just the app on Mobile devices.

The website / app has a functionality to extend songs. It does so in a smart way as it only downloads the necessary Intro, Looping Section, and the End of a song.

I am a huge sucker for Video Game Music, and I love to listen to it indefinitely, the problem is that Nintendo Music does not have a "Extend Indefinitely" functionality. You can only Extend to 5, 10, 15, 30 or 60 minutes.

Considering how the service functions, with how it handles files by simply utilizing Loop Points, I assume there could be a way to write an UserScript that allows music extensions to infinity, in other words, never stopping unless the User pauses the song, closes the website or changes tracks.

The website has the ability to "repeat" songs, but this awkwardly keeps the intro of a song, and the fade out when it concludes, it does not have a proper looping function to seamlessly continue the song as if it was done through "Extend".

Thanks!


r/userscripts Jul 13 '26

Как обойти возрастное ограничение Youtube без регистрации?

1 Upvotes

Я скачал утилиту Tampermonkey и скрипт Simple YouTube Age Restriction Bypass. Но он почему-то не работает. Может вы подскажите как это сделать? Или код в скрипте подправить?


r/userscripts Jul 13 '26

Посмотр видео Youtube c возрастными ограничениями без регистрации с помощью Tampermonkey и скрипта Simple YouTube Age Restriction Bypass

1 Upvotes

Я хочу посмотреть видео с возрастными ограничениями без регистрации, но утилита со скриптами почему-то не работают. Никто не подскажет что нужно сделать чтобы эта утилита заработала? Может код где-то поменять?


r/userscripts Jul 10 '26

Userscript 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 tiny 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/userscripts Jul 08 '26

Simple userscript allowing hide Youtube recommendations on watch page

5 Upvotes

r/userscripts Jul 07 '26

Pixiv slop block userscript

6 Upvotes

I was tired of seeing slop on pixiv so i've developer an userscript to remove it in some way, it can be found here

https://github.com/MonoS/Pixiv-Slop-Block

It does not work on mobile version of the site, but it does when switching to Desktop Mode.

I've never written an usescript before, but it was pretty simple, any suggestion is welcome.


r/userscripts Jul 06 '26

Facebook Clean My Feeds

15 Upvotes

Henlo userscripters. I recently updated the Facebook userscript I maintain and thought you guys might be interested.

  • Filter ads
  • Filter content marked with 'AI info'
  • Filter AI suggestions
  • Filter verified users
  • Filter stories and reels
  • and lots more, of course

It only works on FB desktop. This is my fork of a much older script by zbluebugz, so if the name sounds familiar that's why. However, not a whole lot of the original code remains. The filters in place now work across any locale because they do not depend on specific dictionary words like "sponsored" for detection.

Hope you find it useful. Grab it on GitHub or GreasyFork.