Created
May 30, 2012 01:48
-
-
Save kawaz/2832523 to your computer and use it in GitHub Desktop.
特定キーワードをテキストに含むリンクを隠す
This file contains 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== | |
// @name hide_akb_link | |
// @namespace http://q.hatena.ne.jp/1338338074 | |
// @description 特定キーワードをテキストに含むリンクを隠す | |
// @version 1.0 | |
// @match http://*/ | |
// @match https://*/ | |
// ==/UserScript== | |
(function(){ | |
var pattern = new RegExp("AKB"); | |
Array.prototype.slice.call(document.getElementsByTagName("a")).forEach( | |
function(a) { | |
if(a.innerText.match(pattern)) { | |
a.style.display = "none"; | |
} | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment