はてなのキーワードリンクを消し、通常のテキストに換える。
当前为
// ==UserScript==
// @id Kill Hatena Keyword
// @name Kill Hatena Keyword
// @version 0.9.20170104
// @namespace https://greasyfork.org/ja/users/6866-ppppq
// @author ppppq
// @description はてなのキーワードリンクを消し、通常のテキストに換える。
// @match http://anond.hatelabo.jp/*
// @match http://*.hatena.ne.jp/*
// @match http://*.hatenablog.jp/*
// @match http://*.hatenablog.com/*
// @match http://*.hatenadiary.com/*
// @match http://*.hatenadiary.jp/*
// @match http://*.hateblo.jp/*
// @exclude http://d.hatena.ne.jp/keyword/*
// @run-at document-ready
// @grant none
// ==/UserScript==
var d = document;
killKeywords(d);
d.addEventListener('AutoPagerize_DOMNodeInserted', function(aEvent) {
var doc = aEvent.target;
killKeywords(doc);
});
function killKeywords(aDoc) {
var doc = aDoc;
var keywords = doc.querySelectorAll('a[class*="keyword"]');
for (var keyword of keywords) {
var text = d.createTextNode(keyword.textContent);
keyword.parentNode.replaceChild(text, keyword);
}
}