// alt2title
// version 0.1
// 2005-09-01
// Copyright (c) 2005, Alex Muntean
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.  To install it, you need
// Greasemonkey 0.5 or later: 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 "alt2title", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          alt2title
// @namespace     http://alex.muntean.name/projects/mozilla/greasemonkey/
// @description   Copies all the 'alt' attributes to 'title' attributes so Firefox will display them like IE does.
// @include       *
// ==/UserScript==

var elemsWithAlt, elem;
elemsWithAlt = document.evaluate('//*[@alt][not(@title)]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < elemsWithAlt.snapshotLength; i++) {
	elem = elemsWithAlt.snapshotItem(i);
	elem.title = elem.alt;
}

