diff --git a/improved_redgifs.user.js b/improved_redgifs.user.js
index 7cab70d..0076a61 100644
--- a/improved_redgifs.user.js
+++ b/improved_redgifs.user.js
@@ -1,13 +1,13 @@
// ==UserScript==
// @name Improved RedGIFs
// @namespace BigDuckie.ImprovedRedgifs
-// @version 2025.1.13
-// @description Fix a few annoying "features" and add an easy download button.
+// @version 2025.12.21
+// @description Fixes a few annoying "features" and add an easy download button.
// @icon https://www.google.com/s2/favicons?sz=64&domain=redgifs.com
// @author Big Duckie
// @copyright 2025, Big Duckie (https://bigduckie.dev)
// @license MIT
-// @match https://*.redgifs.com
+// @match https://*.redgifs.com/
// @match https://*.redgifs.com/watch/*
// @match https://*.redgifs.com/niches/*
// @match https://*.redgifs.com/ifr/*
@@ -20,7 +20,7 @@
(function () {
'use strict';
GM_addStyle(`
- .DLButton {
+ .RGButton {
background: 0 0;
border: none;
cursor: pointer;
@@ -58,55 +58,68 @@
stroke_linejoin: "round"
}).html(``);
- const download_svg = () => jQuery(document.createElementNS("http://www.w3.org/2000/svg", "svg"))
- .attr({
- width: 24,
- height: 24,
- viewBox: "0 0 24 24",
- fill: "none",
- stroke: "currentColor",
- stroke_width: 2,
- stroke_linecap: "round",
- stroke_linejoin: "round"
- }).html(``);
+ const download_svg = () => jQuery(document.createElementNS("http://www.w3.org/2000/svg", "svg")).attr({
+ width: 24,
+ height: 24,
+ viewBox: "0 0 24 24",
+ fill: "none",
+ stroke: "currentColor",
+ stroke_width: 2,
+ stroke_linecap: "round",
+ stroke_linejoin: "round"
+ }).html(``);
// Remove overlayer
- jQuery.initialize(".Player-OverLayer", function() {
+ jQuery.initialize(".Player-OverLayer", function () {
this.remove();
});
- // Watch & Niche pages
- jQuery.initialize(".SideBar", function () {
- const gif_root = jQuery(this).parent().parent();
- let gif_id = gif_root.attr("id").substring(4);
+ // --- Watch pages ---
+ jQuery.initialize(".sideBar", async function () {
+ const sidebar = jQuery(this);
+ const root = sidebar.parents(".GifPreview");
- jQuery(this).find(".SideBar-Item>.rg-button.views").on("click", function () {
- togglePlayer(gif_root.find(".Player-Video>video")[0]);
- }).children("svg").replaceWith(pause_svg());
-
- jQuery(this).children(".SideBar-Item:has(.FSButton)").after(
+ // Add play pause button
+ sidebar.prepend(
jQuery("
", {
- class: "SideBar-Item"
+ class: "sideBarItem"
}).append(
jQuery("