Created
October 13, 2012 15:13
-
-
Save lolicsystem/3884946 to your computer and use it in GitHub Desktop.
Pixivから腐向け画像を消去する、Firefox用Greasemonkeyスクリプト
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 pixiv no more FU | |
// @namespace http://lolicsystem.com/gm_scripts/ | |
// @description This is a script that makes the picture whose title contains the NG word "腐" (meaning Homosexuality in Japanese) invisible. | |
// @include http://www.pixiv.net/* | |
// @author lolicsystem (@lolicsystem / twitter) | |
// @version 0.1 | |
// ==/UserScript== | |
(function () { | |
var debug = false; | |
var targetClass = [ "ranking", | |
"ranklist", | |
"top_display_works", | |
"images", | |
"articles" ]; | |
$X = function(e) { | |
var r = []; | |
var x = document.evaluate(e, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0, l = x.snapshotLength; i < l; i++) { | |
r.push(x.snapshotItem(i)); | |
} | |
return r; | |
}; | |
var mes = ''; | |
for (var i = 0; i < targetClass.length; i++) { | |
var aa = $X('//*[contains(concat(" ",normalize-space(@class)," "), "' + targetClass[i] + '")]/*'); | |
for (var j = 0; j < aa.length; j++) { | |
if (aa[j].innerHTML.match(/腐/)) { | |
mes += "● " + aa[j].innerHTML + "\n"; | |
aa[j].style.display = "none"; | |
} | |
} | |
} | |
if (debug == true && mes != '') { | |
alert("以下の腐ったエレメントを消します\n\n" + mes); | |
} | |
})(); |
インストールは、Greasemonkey をインストールした Firefox で本ページを開いて、ソースコード表示右上にある
「raw」 というリンクをクリックすれば始まります。
検索でたどり着きました。早速インストールして使わせていただいた所、
見事にランキングから腐向け画像が消え、感動しました。
しかしながら、 AutoPagerize で継ぎ足されたページでは機能せず、
依然、腐向け画像が表示されてしまいます。
もしよろしければ、 AutoPagerize にもご対応いただけないでしょうか。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pixiv で、最近ランキングに腐向け画像が多く見られるので、それを消すための Greasemonkey スクリプトです。
ランキング一覧や、新着画像欄から、タイトルに「腐」という文字が入っている画像を消します。