Skip to content

Instantly share code, notes, and snippets.

@otsune
Created January 24, 2010 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otsune/285386 to your computer and use it in GitHub Desktop.
Save otsune/285386 to your computer and use it in GitHub Desktop.
// Copyright (C) 2005, temp_h.
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// ==UserScript==
// @name Disable HATENA keyword
// @namespace http://www.pandora.nu/tempo-depot/js
// @description Disable HATENA keyword ancher. Ancher nodes will be replaced with span nodes.
// @author temp_h <temp_h@pandora.nu>
// @include http://d.hatena.ne.jp/*
// @include http://*g.hatena.ne.jp/*
// ==/UserScript==
(function () {
var kwNodes = document.queryselectorAll('a.keyword, a.okeyword');
for (var i = 0; i < kwNodes.length; i++){
var n = kwNodes[i];
var r = document.createElement('SPAN');
r.className = 'keyword';
for(var j = 0; j < n.childNodes.length; j++)
r.appendChild(n.childNodes[j].cloneNode(true));
n.parentNode.replaceChild(r, n);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment