Topic: Raw Tumblr (Greasemonkey script)

Posted under e621 Tools and Applications

This script converts Tumblr direct image links to the _raw format.
It supports several different types of Tumblr direct image links.

Disadvantage: It loads the image twice, first the normal version, then the _raw one.
Advantage: It's really simple.

// ==UserScript==
// @name         Raw Tumblr
// @namespace    http://www.munkelzahn.horse/
// @version      0.1
// @description  Convert direct image links on Tumblr to _raw links
// @author       Munkelzahn
// @include      /^(https?:\/\/\d+\.media\.tumblr\.com\/)([a-z0-9]+\/tumblr_)(inline_)?([a-zA-Z0-9]+_)(r\d+_)?(\d+[a-z]?)(\.[a-z]+)$/
// @grant        none
// ==/UserScript==

(function() {
    var regexp = /^(https?:\/\/\d+\.media\.tumblr\.com\/)([a-z0-9]+\/tumblr_)(inline_)?([a-zA-Z0-9]+_)(r\d+_)?(\d+[a-z]?)(\.[a-z]+)$/;
    window.location.href = document.URL.replace(regexp, "https://s3.amazonaws.com/data.tumblr.com/$2$3$4$5raw$7");
})();

Regular:
http://sirredbenjamin.tumblr.com/post/167426034288/could-use-some-more-plants
http://78.media.tumblr.com/d63563ab3c01142db67eb7055a78f89a/tumblr_ozbskqYvLC1tdkn7oo1_1280.jpg

Inline:
http://visiti.tumblr.com/post/167451907022/visiti-uh-oh-oh
http://78.media.tumblr.com/fa93c8a9d137fff645055bdc9e2f8ce9/tumblr_inline_ozd3whC0oS1t658or_500.png

Resolution followed by "h":
http://kum-dog.tumblr.com/post/155274049871/commission-for-wyatt
http://78.media.tumblr.com/f3709a8d257e73de3b31bc2654cdd0c3/tumblr_oj4qqiPX0R1t8icefo1_500h.jpg

Revision numbers:
http://potheplatypus.tumblr.com/post/167401528679
http://78.media.tumblr.com/2253ed455d4c0c1cac937767d400f0a4/tumblr_ozakf55XJp1r4eyo7o1_r1_1280.png

Updated by user 229276

  • 1