Sleazy Fork is available in English.

Yet Another Redgifs Downloader (YARD)

adds a button to the top-left corner that downloads redgifs videos as mp4.

// ==UserScript==
// @name         Yet Another Redgifs Downloader (YARD)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  adds a button to the top-left corner that downloads redgifs videos as mp4.
// @author       Starcalledd
// @match        http*://*.redgifs.com/*
// @grant        GM_download
// @license      MIT
// ==/UserScript==


// big disclaimer, i have no fucking clue what im doing and any actual programmer reading this will likely have an aneurysm.
(function() {
    'use strict';

    // makes a button in the top left. blatantly copied this specific portion from someone else but it's so generic i don't think i'm getting sued over it.
    var button = document.createElement("button");
    button.innerHTML = "Download Video";
    button.style.position = "fixed";
    button.style.top = "10px";
    button.style.left = "10px";
    button.style.zIndex = 1000;


    // makes the button do something. you know, so you can use it.
    button.onclick = function(){

        // this is awful. i hate this. do not give me access to regex under any circumstances.
        // reads the page's source code and finds all strings matching the format of:
        // files.redgifs.com/VeryCoolVideo-mobile.jpg
        // there are usually two.
        var pageSource = document.body.innerHTML
        var shitREGEX = /(files\.redgifs\.com\/\w*-mobile\.jpg)/
        var regMatch = shitREGEX.exec(pageSource).toString();
        // alert(regMatch);

        // utterly and completely fucked. there is an easier way to do this. i do not care.
        // takes the output from the previous section and isolates the video ID
        // in the example earlier, the ID would be VeryCoolVideo
        let step1 = regMatch.split(".");
        let step2 = step1[2].split("/");
        let step3 = step2[1].split("-");
        var videoID = step3[0].toString();
        // alert(videoID);

        // downloads the video of the page you're on.
        var url = `https://files.redgifs.com/${videoID}.mp4`
        GM_download(url, `${videoID}.mp4`)

        console.log("HEYA");
    };

    // actually add the button to page. you know, so you can use it.
    document.body.appendChild(button);

})();