// Scalable Images user script
// version 1.0
// 2007-11-14
// Copyright (c) 2007, TAAT Technologie Cyfrowe
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Scalable Images", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          Scalable Images
// @namespace     http://diveintogreasemonkey.org/download/
// @description   Makes all images scale as same as text on CTRL+ (layout doesn't break up)
// @include       *
// ==/UserScript==

    var images=document.getElementsByTagName('img')
	for (var i=1;i<images.length;i++)
	{
       var img = new Image();
       img.src = images[i].src;
       var height = img.height;
       var width = img.width;
        images[i].style.fontSize='16px';
        images[i].style.width=width/16+'em';
        images[i].style.height=height/16+'em';
	}