Last active
December 11, 2015 18:39
-
-
Save ganta/4643530 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
// ==UserScript== | |
// @id hatena-keyword-link-remover | |
// @name Hatena Keyword Link Remover | |
// @namespace http://piyopiyoducky.net/ | |
// @author Hideki IGARASHI | |
// @description はてなダイアリー&はてなブログのキーワードリンクを除去します。 | |
// @include http://d.hatena.ne.jp/* | |
// @include http://*.hatenablog.com/* | |
// @include http://*.hatelabo.jp/* | |
// @version 1.0.1 | |
// ==/UserScript== | |
var d = document; | |
var r = d.createRange(); | |
var a = d.querySelectorAll("span.highlight,a.keyword,a.okeyword"); | |
var n = a.length; | |
var v; | |
while (n--) { | |
v = a[n]; | |
r.selectNodeContents(v); | |
v.parentNode.replaceChild(r.extractContents(), v); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment