Skip to content

Instantly share code, notes, and snippets.

@taizooo
Created October 18, 2008 14:31
Show Gist options
  • Save taizooo/17674 to your computer and use it in GitHub Desktop.
Save taizooo/17674 to your computer and use it in GitHub Desktop.
// ==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