Image Remover for the E-Hentai Forums

Removes specified images in the E-Hentai forums

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name            Image Remover for the E-Hentai Forums
// @description     Removes specified images in the E-Hentai forums
// @include         http://forums.e-hentai.org/*
// @version 0.0.1.20150718213008
// @namespace https://greasyfork.org/users/2233
// ==/UserScript==

var wnd = window
var doc = wnd.document
var loc = location
var href = loc.href

var $  = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelector(css) }
var $$ = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelectorAll(css) }

var imgs = $$('IMG')
if(imgs) {
    var p = [
        /\bstyle_emoticons\//,
        /\/folder_post_icons\//,
        /\/ehgt\/cm\//,
    ]
    for(var i=imgs.length-1; i>=0; i--) {
        for(var a=0, len=p.length; a<len; a++) {
            if(p[a].test(imgs[i].src)) {
                imgs[i].style.display = 'none'
                break
            }
        }
    }
}