// ==UserScript==
// @name          Unping
// @description   neutralize ping attempts in Firefox 1.6+
// @version       2006-01-23
// @namespace     http://diveintomark.org/projects/greasemonkey/
// @include       *
// ==/UserScript==
//
// Tested with
// - Firefox-cvs-20060118, Greasemonkey-cvs-20060118 <http://greasemonkey.mozdev.org/>

/* BEGIN LICENSE BLOCK
Copyright (C) 2006 Mark Pilgrim

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You can download a copy of the GNU General Public License at
http://diveintomark.org/projects/greasemonkey/COPYING
or get a free printed copy by writing to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
END LICENSE BLOCK */

var snapPing = document.evaluate("//*[@ping]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < snapPing.snapshotLength; i++) {
    var elmLink = snapPing.snapshotItem(i);
    elmLink.setAttribute('ping', '');
}

//
// ChangeLog
// 2006-01-23 - added support for area elements and any other random crap Mozilla has implemented outside the spec (thanks Anne: http://annevankesteren.nl/2006/01/ping )
// 2006-01-18 - initial version
