Reddit Image Directly

This script uses the a proxy to redirect images on reddit

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name            Reddit Image Directly
// @namespace       https://greasyfork.org/users/821661
// @match           https://www.reddit.com/media?url=*
// @grant           none
// @version         1.2.1
// @run-at          document-start
// @license         GPL-3.0
// @author          hdyzen
// @description     This script uses the a proxy to redirect images on reddit
// ==/UserScript==

const getImgUrl = () => {
    try {
        const url = new URL(window.location.href);
        const imageUrl = new URL(url.searchParams.get("url"));

        return imageUrl.pathname;
    } catch (err) {
        console.error("Error on get image url:", err);
        return "unknow";
    }
};

window.location.href = `https://go-reddit-load-image-directly.vercel.app/${getImgUrl()}`;