Created
October 18, 2008 14:31
-
-
Save taizooo/17674 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name tumblr dsbd photo m2d conv | |
// @namespace http://www.tumblr.com/ | |
// @include http://www.tumblr.com/dashboard* | |
// @include http://www.tumblr.com/show* | |
// @include http://www.tumblr.com/tumblelog* | |
// @include http://www.tumblr.com/filter* | |
// @include http://*.tumblr.com/* | |
// ==/UserScript== | |
(function () { | |
var f = function(docs) { | |
for (var n = 0,nLen = docs.length;n < nLen;n++) { | |
var imgTags = docs[n].getElementsByTagName('img'); | |
for (var i = 0, len = imgTags.length;i < len;i++){ | |
var img = imgTags[i]; | |
if (img.src.match(/media\.tumblr\.com\/(\w+)\.(\w+)$/)) { | |
img.src = 'http://data.tumblr.com/' + RegExp.$1 + '.' + RegExp.$2; | |
} | |
} | |
} | |
} | |
f([document]); | |
if (window.AutoPagerize) window.AutoPagerize.addFilter(f); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment