Redirect Imgur to Rimgo (via Farside)

Redirect all Imgur pages and direct media to farside.link/rimgo, preserving path/query/hash.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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!)

// ==UserScript==
// @name         Redirect Imgur to Rimgo (via Farside)
// @description  Redirect all Imgur pages and direct media to farside.link/rimgo, preserving path/query/hash.
// @version      1.0.1
// @namespace    https://greasyfork.org/users/944996
// @icon         https://www.google.com/s2/favicons?sz=64&domain=imgur.com
// @match        *://imgur.com/*
// @match        *://m.imgur.com/*
// @match        *://i.imgur.com/*
// @exclude      *://api.imgur.com/*
// @run-at       document-start
// @grant        none
// @license      MIT
// @noframes
// ==/UserScript==

(function() {
  'use strict';

  // Avoid loops if someone navigates directly to farside.link/rimgo
  if (location.hostname === 'farside.link' && location.pathname.startsWith('/rimgo')) return;

  // Make sure we're on an Imgur domain
  if (!/(\.|^)imgur\.com$/i.test(location.hostname)) return;

  const destBase = 'https://farside.link/rimgo';
  const path = location.pathname + location.search + location.hash;
  const target = destBase + path;

  if (location.href !== target) {
    // Use replace so the original Imgur URL doesn't remain in history
    location.replace(target);
  }
})();