{"id":51035243,"url":"https://github.com/paytonison/x-loader","last_synced_at":"2026-06-22T05:01:39.290Z","repository":{"id":365159365,"uuid":"1270813867","full_name":"paytonison/x-loader","owner":"paytonison","description":"Userscript that adds compact media download buttons for images, videos, GIFs, and banners on X/Twitter.","archived":false,"fork":false,"pushed_at":"2026-06-16T07:40:53.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T07:42:33.421Z","etag":null,"topics":["image-downloader","media-downloader","tampermonkey","twitter","twitter-downloader","userscript","video-downloader","violentmonkey","x-downloader","x-twitter"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paytonison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-16T04:34:18.000Z","updated_at":"2026-06-16T07:40:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/paytonison/x-loader","commit_stats":null,"previous_names":["paytonison/x-loader"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/paytonison/x-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonison%2Fx-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonison%2Fx-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonison%2Fx-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonison%2Fx-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paytonison","download_url":"https://codeload.github.com/paytonison/x-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paytonison%2Fx-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34635038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-downloader","media-downloader","tampermonkey","twitter","twitter-downloader","userscript","video-downloader","violentmonkey","x-downloader","x-twitter"],"created_at":"2026-06-22T05:01:38.608Z","updated_at":"2026-06-22T05:01:39.285Z","avatar_url":"https://github.com/paytonison.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X-Loader\n\nX-Loader is a userscript for X/Twitter that adds compact download controls to\nmedia on `x.com` and `twitter.com`.\n\nIt is focused on saving images, videos, animated GIFs, multi-media posts, and\nprofile banners directly from the page. The script also includes a small set of\nquality-of-life tweaks for browsing X/Twitter, such as direct `t.co` link\nexpansion, visited-link highlighting, title cleanup, and optional hiding of\nsome noisy page sections.\n\n## What it does\n\nX-Loader watches the X/Twitter page for media as the timeline changes. When it\nfinds supported media, it adds a small overlay download button near the top-left\nof the media area.\n\nThe button is intentionally compact:\n\n- red means the item has not been downloaded yet\n- blue means the item is already in local download history\n- green means the item was downloaded during the current session\n- progress is shown on the button while a download is running\n- multi-media posts show a small progress marker for batch downloads\n\nThe script handles dynamically loaded content with a `MutationObserver`, so it\ncontinues to work as X/Twitter inserts new timeline items without a full page\nreload.\n\n## Supported media\n\nX-Loader can download:\n\n- tweet images\n- tweet videos\n- animated GIFs, saved through the video path\n- multi-image and mixed-media tweets\n- media thumbnails in `/media` style views\n- profile banners/background images when detected\n\nFor images, the script tries to fetch the best available version first. It\nstarts with `orig`, falls back through larger preview sizes, and marks fallback\ndownloads with a `[sample]` prefix in the filename when the original cannot be\nretrieved.\n\nFor videos and animated GIFs, the script asks X/Twitter's internal tweet API for\nthe post media list and chooses the highest bitrate downloadable variant.\n\n## Filename format\n\nDownloads are named from tweet and media metadata so files remain searchable\nafter they leave the browser.\n\nImage files use:\n\n```text\n[twitter]{sampleText} {author}—{lastModifiedDate}—{tweetId}—{name}.{extension}\n```\n\nVideo files use:\n\n```text\n[twitter] {author}—{lastModifiedDate}—{tweetId}—{name}.{extension}\n```\n\nProfile banner files use:\n\n```text\n[twitter][bg] {username}—{lastModifiedDate}—{id}—{seconds}.{extension}\n```\n\nThe date is based on the media response's `Last-Modified` header, not the local\ndownload time.\n\n## Extra page features\n\nSeveral non-download features are enabled by default:\n\n- **Direct Links** replaces visible `t.co` redirect links with the expanded URL\n  when the destination can be reconstructed from the page.\n- **Enhanced Title** cleans up open-tweet page titles and expands shortened\n  links where possible.\n- **Highlight Visited Links** colors visited links, defaulting to absolute\n  external links only.\n- **Hide Trends** hides the Trends section in the right column when the current\n  page language is supported.\n\nSome older or more fragile options remain in the settings UI but are disabled by\ndefault, including hiding sign-up sections, hiding login popups, expanding some\nsensitive-content prompts, and redirecting from mobile Twitter URLs.\n\n## Settings menu\n\nOpen the userscript manager menu and choose **Show settings**.\n\nThe settings modal lets you toggle:\n\n- image download buttons\n- video download buttons\n- direct links\n- enhanced title handling\n- visited-link highlighting\n- trends hiding\n- download button border\n- Firefox strict tracking protection workaround\n\nThe settings modal also includes history tools:\n\n- **Export** downloads a JSON backup of X-Loader settings and download history.\n- **Import** replaces local settings/history from a JSON backup.\n- **Merge** combines a backup with the existing local history.\n\nReload the page after changing settings. The script stores settings and download\nhistory in `localStorage`.\n\n## Download history\n\nX-Loader keeps local history to avoid presenting already saved media as new.\n\nImage history is tracked by image name by default. A hidden setting can switch\nimage history to tweet ID, but that mode treats all images in the same tweet as\nthe same saved item. Video history is tracked by tweet ID plus media index.\n\nHistory only lives in the browser profile where the userscript runs unless you\nexport and import it manually.\n\n## Browser notes\n\nThe script is intended to run in userscript managers such as Tampermonkey,\nViolentmonkey, or a Safari userscript extension that supports standard\nuserscript metadata.\n\nCurrent compatibility work includes:\n\n- no regex lookbehind dependency in the userscript code path\n- deferred startup until `document.body` exists\n- attached temporary anchor elements for blob downloads\n- Safari-safe response progress handling\n- Firefox strict tracking protection support through the settings option\n\nThe script grants only:\n\n```text\nGM.registerMenuCommand\n```\n\nMedia downloads are performed through page `fetch`, blob URLs, and browser\ndownloads.\n\n## Installation\n\nInstall the userscript from:\n\n```text\nhttps://raw.githubusercontent.com/paytonison/x-loader/main/X-Loader.user.js\n```\n\nThe metadata block also points `@downloadURL` and `@updateURL` at that file.\n\n## Development\n\nThe project is intentionally small:\n\n```text\nX-Loader.user.js\nREADME.md\n```\n\nUseful local checks:\n\n```sh\nnode --check X-Loader.user.js\ngit diff --check\n```\n\nBecause X/Twitter changes its DOM and internal API shapes frequently, behavior\nshould be tested in the browser after any selector, API, or media-handling\nchange.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaytonison%2Fx-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaytonison%2Fx-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaytonison%2Fx-loader/lists"}