// ==UserScript==
// @name        Hatena Keyword Remover
// @namespace   http://ccm.sherry.jp/
// @description Removes keyword links on the Hatena Diary
// @include     http://d.hatena.ne.jp/*
// @include     http://*.g.hatena.ne.jp/*
// ==/UserScript==

(function () {
    var xpath = "//a[starts-with(@href, 'http://d.hatena.ne.jp/keyword/')]";
    var res = document.evaluate(
	xpath, document, null,
	XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    
    var i, anchor;
    for (i = 0; anchor = res.snapshotItem(i); i++) {
	var keyword = anchor.firstChild.nodeValue;
	
	anchor.parentNode.replaceChild(
	    document.createTextNode(keyword),
	    anchor);
    }
})();

