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.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

Author
p65536
Daily installs
4
Total installs
151
Ratings
3 0 0
Version
1.6.0
Created
2025-08-11
Updated
2025-11-16
Size
52.3 KB
License
MIT
Applies to

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.

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: Instantly opens any video from a thumbnail grid or feed on its dedicated page.
  • 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.

Annoyance & Ad Removal

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.

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

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

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)

This script's architecture was fundamentally changed in v1.3 and again in v1.5 to improve speed and resilience.

Unlike older versions (v1.2), this script no longer makes its own API requests (for guest tokens, etc.) when you click a download button. Instead, it now intercepts the site's own data 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 to Site Changes
v1.5+ JSON.parse Interception Intercepts the JSON.parse function itself. It inspects all parsed JSON data on the site to find video information. Extremely Resilient:
Works even if the site changes its data-fetching method (e.g., to gRPC, WebSocket).
Very Fast:
Data is cached instantly as the site uses it.
Very Broad:
Intercepts all JSON parsing, requiring careful filtering.
(This script uses efficient key-checking and early returns to mitigate performance impact.)
Highest:
As long as the site uses JSON to get video data, this will work.
         
v1.3 - v1.4 XHR/Fetch Interception Intercepted the site's network requests (fetch/XHR) to api.redgifs.com to "read" the response data. Resilient:
Doesn't depend on API tokens.
Fast:
Data is cached as the page loads.
Fragile:
Breaks if the site stops using fetch/XHR or changes its API endpoint structure.
Medium:
Vulnerable to network-level changes.
         
v1.2 & Older On-Demand API Request When you clicked "Download," the script would:
1. Fetch a Guest Token.
2. Use the token to fetch Video Info.
3. Initiate the download.
Simple:
Easy to understand logic.
Very Fragile:
Broke constantly due to site changes in the authentication/API process.
Slow:
Required 2+ network requests per download.
Lowest:
This method was abandoned due to its high maintenance burden.

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