clemente / Redirection d’image Imgur

// ==UserScript==
// @name           Redirection d’image Imgur
// @namespace      https://openuserjs.org/users/clemente
// @match          https://imgur.com/*
// @version        1.0
// @author         clemente
// @license        MIT
// @description    Redirige une page Imgur vers l’image uniquement
// @icon           https://s.imgur.com/images/favicon-96x96.png
// @noframes
// @run-at         document-start
// @homepageURL    https://openuserjs.org/scripts/clemente/Redirection_d%E2%80%99image_Imgur
// @supportURL     https://openuserjs.org/scripts/clemente/Redirection_d%E2%80%99image_Imgur/issues
// ==/UserScript==

if (/imgur\.com\/[a-zA-Z0-9]{7}$/.test(window.location)) {
  window.location = window.location.toString().replace('imgur.com', 'i.imgur.com') + ".png";
}