diff --git a/improved_redgifs.user.js b/improved_redgifs.user.js index 0076a61..6aeb720 100644 --- a/improved_redgifs.user.js +++ b/improved_redgifs.user.js @@ -2,7 +2,7 @@ // @name Improved RedGIFs // @namespace BigDuckie.ImprovedRedgifs // @version 2025.12.21 -// @description Fixes a few annoying "features" and add an easy download button. +// @description Fix 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) @@ -74,8 +74,15 @@ this.remove(); }); + // Remove videoLink href + jQuery.initialize(".videoLink", function() { + jQuery(this).removeAttr("href"); + }); + // --- Watch pages --- jQuery.initialize(".sideBar", async function () { + console.debug("detected watch page gif"); + const sidebar = jQuery(this); const root = sidebar.parents(".GifPreview"); @@ -117,38 +124,54 @@ root.find(".PPButton>svg").replaceWith(pause_svg()); }); }, { target: jQuery(".previewFeed")[0] }); - // ---- Watch Pages --- + // --- Watch Pages --- - // IFR pages (Still needs rework) - jQuery.initialize(".embeddedPlayer", function () { - jQuery(this).children(".buttons").prepend( - jQuery("
", { - class: "button" - }).append( - pause_svg().attr({ class: "playButton" }) - ).on("click", () => { - togglePlayer(jQuery(".videoLink>video")[0]); - }) - ) + // --- IFR Pages (Embedded) --- + jQuery.initialize(".sidebar", function () { + console.debug("detected embedded gif"); - jQuery(this).children(".buttons").append( - jQuery("
", { - class: "button" + const sidebar = jQuery(this); + const root = sidebar.parents(".embeddedPlayer"); + + // Add play pause button + sidebar.prepend( + jQuery("
  • ", { + class: "item" }).append( - download_svg() - ).on("click", () => { - download(window.location.pathname.split("/")[2]) - }) - ) + jQuery("