// ==UserScript==
// @name Simple site signatures
// @author Arve Bersvendsen 
// @namespace http://virtuelvis.com/
// @description  Adds simple site signatures by adding an id attribute
//			to the body element of sites where no such
//			element is present. This script is deprecated
//			since Opera 9.
// @ujs:category general: developer_tools
// @ujs:published 2005-05-11 16:24
// @ujs:modified 2005-10-26 10:06
// @ujs:documentation http://userjs.org/scripts/general/developer_tools/simple-site-signature 
// @ujs:download http://userjs.org/scripts/download/general/developer_tools/bodyid.js 
// @ujs:download.gm http://userjs.org/scripts/download/general/developer_tools/bodyid.user.js
// ==/UserScript==


/* 
 * This script is granted to the Public Domain
 */

document.addEventListener('load', function(ev){ 
	if ((document.body) && (!document.body.hasAttribute('id'))) {
		document.body.setAttribute('id', location.host.replace(/^www\./,'').replace(/^\d/,'_$&').replace(/\./g,'-'));
	}
}, false); 