// Automatic coComment
// version 0.1
// 05 Feb 2006
// Copyright (c) 2005, Brian Benzinger
// 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 "Automatic coComment", and click Uninstall.
//
// ==UserScript==
// @name		Automatic coComment
// @namespace	http://www.solutionwatch.com
// @description 	Automatically enable coComment when a comment form has been detected
// @include	*
// ==/UserScript==

(function(){
	if (
		document.getElementById("commentform") || 
		document.getElementById("comment-form") || 
		document.getElementById("FinalPublish") ||
		(document.getElementById("permalink") && document.getElementById("txtComment")) ||
		(document.getElementById("sform") && document.getElementById("btnSubmit"))
		){
		var element = document.createElement('script');
		element.setAttribute('src','http://www.cocomment.com/js/cocomment.js');
		document.body.appendChild(element);
	}
})();