RedGIFs Video Download Button

Adds a download button (for one-click HD downloads) and an "Open in New Tab" button to each video on the RedGIFs site.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Autor
p65536
Denně instalací
6
Celkem instalací
1.554
Hodnocení
7 0 0
Verze
2.4.0
Vytvořeno
11. 08. 2025
Aktualizováno
24. 04. 2026
Size
107,5 KB
Licence
MIT
Spustit na

Overview

This script enhances your RedGIFs experience by adding two convenient buttons to each video:

  1. A download button for one-click downloads of the HD version.
  2. An "Open in New Tab" button to quickly view the video on its own page (or in the distraction-free Clean Viewer).

It also now includes a powerful Annoyance & Ad Remover to clean up the UI.

Please note: This script does not work on videos embedded on external sites, only on RedGIFs itself.
There are no plans to add support for embedded videos.


Features

  • One-Click HD Download: Automatically fetches the HD video source and downloads it directly.
  • Open in New Tab: Works as a standard link, supporting Middle-Click and Ctrl+Click to open videos in a background tab without losing focus.
  • Distraction-Free "Clean Viewer": Optionally open videos in a minimalist, player-only interface with a dark background. (Configurable in settings)
  • Seamless UI Integration: The buttons are added to the corner of each video, looking like a native feature.
  • Dynamic Content Support: Works reliably on pages with infinite scrolling by automatically detecting newly loaded videos.
  • Visual Feedback: The download button's icon changes to show its status (in progress, success, error), and a toast notification provides clear feedback.

New Features

  • (2026/04/24) Tags in Filenames: Added the {tags} placeholder to the filename template settings. You can now automatically include video tags (e.g., #tag1_#tag2) in your downloaded files. Generated filenames are also now safely limited to 150 characters to prevent OS-level saving errors.
  • (2026/01/16) Distraction-Free "Clean Viewer": Added a minimalist, player-only interface option. You can switch between the standard watch page and this clean mode in the Settings Menu.

Configuration (Settings Menu)

Access the settings via your userscript manager's menu:

  1. Open the Tampermonkey (or equivalent) menu in your browser.
  2. Select RedGIFs Video Download Button Settings.
  3. Configure your preferences in the modal window.

Settings Menu

Settings Panel

Available Options (Click to Expand)
  1. Filename Template
    • Customize the naming format for downloaded files.
    • Placeholders: {user}, {date}, {id}, {tags}
    • Includes a real-time preview to ensure your format is correct.

  2. Appearance: Show buttons only on hover
    • If enabled, buttons are hidden by default and only appear when you hover your mouse over a video or thumbnail.
    • Note: On mobile devices, buttons remain always visible to ensure usability.

  3. Functionality: Open in New Tab
    • Enable Button: Toggle this OFF if you prefer a cleaner look with only the Download button.
    • Viewer Type:
      • Default: Opens the standard RedGIFs watch page.
      • Clean: Opens the video in a minimal, player-only window.

Annoyance & Ad Removal

This script now also cleans the RedGIFs interface by removing visual clutter and ads. This feature is enabled by default and hides the following elements:

  • Top information/ad banner
  • In-feed video ads (on both mobile and desktop)
  • In-feed "Trending Niches" and "Trending Creators" panels
  • Desktop ad sidebar (hidden without breaking the page layout)
  • The external site buttons in the site header (Cams and Live)
  • "LIVE" ad buttons on video sidebars

A Note on This Feature:

Please consider the Annoyance & Ad Removal a "best-effort" bonus feature. The script's core purpose remains the Download and Open in New Tab buttons.

This feature is tuned for the current RedGIFs site layout (as of 2025/11/06), and future site updates will likely break parts of the removal logic. While I will try to keep it functional, please understand that ongoing maintenance for this specific feature is not guaranteed, as it is secondary to the script's main functionality.


Tested Environment

  • This script is primarily developed and tested on Firefox with Tampermonkey.
  • It is also confirmed to work on Chromium-based browsers, but testing on these platforms is less extensive.
  • The script is primarily designed for desktop browsers.
  • While basic functionality is checked using the browser's devtools (mobile emulator), it is not tested on actual mobile devices. You may encounter bugs or UI issues on mobile.

Potential Conflict Warning (Click to Expand)

This script modifies the global JSON.parse function and may conflict with other userscripts that modify the same function.

If you experience page errors or downloads failing, please temporarily disable all other userscripts active on RedGIFs to determine if the cause is a script conflict or a recent site update.


How This Script Works (Evolution of Data Fetching) (Click to Expand)

This script's architecture has evolved to maintain reliability against site updates.

Unlike older versions (v1.2) that made their own API requests, this script now intercepts the site's own data flow to build a cache of HD links in advance. This makes downloads instant and highly efficient.

Here is a brief comparison of the methods used over time:

Script Version Method How It Works Pros (✅) Cons (❌) Resilience
v2.3+ Full Context Interception
(unsafeWindow + Response.json)
Intercepts both JSON.parse and Response.prototype.json directly in the page context (via unsafeWindow). Most Robust:
Captures data even if the site bypasses global JSON.parse or uses modern fetch methods.
Reliable:
Bypasses sandbox limitations to access the true execution context.
Complex:
Requires deeper integration with the browser environment.
Maximum
v1.5 - v2.2 JSON.parse Interception Intercepted the global JSON.parse function to inspect parsed data. Resilient:
Worked well as long as the site used standard JSON parsing.
Limited:
Could be bypassed if the site used fetch().json() native implementation directly.
High
v1.3 - v1.4 XHR/Fetch Interception Intercepted network requests to api.redgifs.com. Fast:
Cached data on load.
Fragile:
Broke if API endpoints changed.
Medium
v1.2 & Older On-Demand API Request Fetched data only when "Download" was clicked. Simple Logic Very Fragile & Slow:
Broke constantly; required extra requests.
Lowest

This script is open-source and licensed under the MIT License.