Created
January 24, 2010 19:15
-
-
Save otsune/285386 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 <[email protected]> | |
// @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