Tumblr Image URL Redirect

Redirects Tumblr Image URLs to the raw version

От 13.10.2017. Виж последната версия.

// ==UserScript==
// @name        Tumblr Image URL Redirect
// @description Redirects Tumblr Image URLs to the raw version
// @version     1.5
// @author      justausername
// @include     *media.tumblr.com*
// @include     *data.tumblr.com*
// @run-at      document-end
// @namespace   justausername
// ==/UserScript==

if(window.location.hostname.indexOf("vt.media.tumblr.com") > -1){
  window.location = window.location.href.replace("vt.media.tumblr.com","vtt.tumblr.com").replace(/_720|_480/,"").replace("#_=_","");
}else if(window.location.hostname.indexOf("media.tumblr.com") > 0) {
  window.location = window.location.href.replace(/https?:\/\/..\.media\.tumblr\.com/,"http://data.tumblr.com").replace(/_1280h*|_540h*|_500h*|_400h*|_250h*|_100h*/,"_raw");
}