Redirects gyazo.com -> i.gyazo.com
// ==UserScript== // @name Gyazo Redirector // @author brian6932 // @namespace https://greasyfork.org/users/581142 // @namespace https://github.com/brian6932 // @license agpl-3.0-only // @description Redirects gyazo.com -> i.gyazo.com // @include /^ht{2}ps:\/{2}gyazo\.com\/[\da-f]+$/ // @grant GM_xmlhttpRequest // @run-at document-start // @version 1.3 // jshint esversion: 11 // ==/UserScript== 'use-strict' GM_xmlhttpRequest({ url: `https://api.gyazo.com/api/oembed?url=` + globalThis.location.href, responseType: `json`, onload: _ => globalThis.location.href = _.response.url ?? (() => { throw globalThis.Error(`OEmbed request failed`) })() })