Tumblr Image URL Redirect

Redirects Tumblr Image URLs to the raw version

< 脚本 Tumblr Image URL Redirect 的反馈

提问 / 留言

§
发布于:2017-09-10

Two redirects fix

When viewing pictures, I noticed it first tried 68.media.tumblr.com/[...]_raw.png before redirecting to media.tumblr.com/[...]_raw.png, so there'd be a 404 not found for a split second.
I changed the entire script to this, and it seems to work so far without the 404 page showing up:

if(window.location.host.indexOf("media.tumblr.com") > 0) {
window.location = window.location.href.replace(/..\.media\.tumblr\.com/,"media.tumblr.com").replace("_1280","_raw").replace("_540","_raw").replace("_500","_raw").replace("_400","_raw").replace("_250","_raw").replace("_100","_raw");
}

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。