Skip to content

Instantly share code, notes, and snippets.

@taizooo
Created November 1, 2008 06:53
Show Gist options
  • Save taizooo/21481 to your computer and use it in GitHub Desktop.
Save taizooo/21481 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name ikenienize! on dsbd
// @namespace http://www.tumblr.com/
// @include http://www.tumblr.com/dashboard*
// @resource jQuery http://w.ikenie.com/8985nize/jquery.js
// ==/UserScript==
/*
nie bookmarklet
by IKENIE
http://ikenie.com
*/
(function () {
eval(GM_getResourceText("jQuery"));
var f = function(doc) {
$("img").each(function(){
i = 0;
offset = $(this).offset();
var div = document.createElement("div");
div.style.position = "absolute";
div.style.zIndex = 9999;
div.style.top = offset.top+'px';
div.style.left = 0;
div.style.width = '100%';
div.style.textAlign = 'left';
div.style.height = (this.height*3)+'px';
div.style.background = 'url('+this.src+')';
div.style.backgroundPosition = '-100px -100px';
document.body.appendChild(div);
for (j=0;j<3;j++) {
var img = document.createElement("img");
img.src = this.src;
img.style.display = 'block';
div.appendChild(img);
}
this.style.visibility = 'hidden';
i++;
});
}
f(document);
function addFilter() {
window.AutoPagerize.addFilter(function(docs){
for (var i = 0,l = docs.length;i < l;i++) f(docs[i]);
});
}
if (window.AutoPagerize && window.AutoPagerize.addFilter)
addFilter();
else
window.addEventListener('GM_AutoPagerizeLoaded', addFilter, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment