oqunize

By cxx Last update Dec 22, 2008 — Installed 24 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

There are 1 previous version of this script.

// ==UserScript==
// @name           oqunize
// @namespace      http://cxx.tumblr.com/
// @include        http://twitter.com/*
// @include        http://explore.twitter.com/*
// @include        https://twitter.com/*
// @include        http://favotter.matope.com/*
// @include        http://pcod.no-ip.org/yats/*
// @exclude        */account/profile_image/*
// @version        2008.12.22.1
// ==/UserScript==

function oqunize(page) {
    page.forEach(function(p) {
        var imgs = p.getElementsByTagName('img');
        for (var i = 0; i < imgs.length; i++) {
            var img = imgs[i];
            if (img.src.indexOf('://s3.amazonaws.com/twitter_production/profile_images/') != -1) {
                img.src = img.src.replace(/_(?:mini|normal|bigger)\.(\w+)$/, '.$1');
                img.style.width = 'auto';
                img.style.height = 'auto';
//                img.style.maxWidth = '100px';
            }
        }
    });
}

oqunize([document.body]);
if (window.AutoPagerize)
    window.AutoPagerize.addFilter(oqunize);