HV Hide Infinite Items

Hide items with infinite supply on the "All" tab of the Item Shop

Tính đến 27-11-2014. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            HV Hide Infinite Items
// @description     Hide items with infinite supply on the "All" tab of the Item Shop
// @include         http://hentaiverse.org/?s=Bazaar&ss=is*
// @version 0.0.1.20141127194910
// @namespace https://greasyfork.org/users/2233
// ==/UserScript==

/*** Settings ***/
if(typeof blist == 'undefined') {
    var blist = [ // Blacklist. Items on the list are hidden.
        // /Mid-Grade Cloth/i,
    ]
}
/*** End of Settings ***/

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) }

if(/&ss=is/.test(href)) {
    if(/&filter=all/.test(href) || (!/&filter=/.test(href))) {
        var shop_pane = $('#shop_pane')
        var items = $$(shop_pane, '.idp')
        var supplies = $$(shop_pane, '.ii')
        for(var i=0, len=items.length; i<len; i++) {
            if(isNaN(parseInt(supplies[i].textContent))) {
                items[i].parentNode.parentNode.style.display = 'none'
            }
            for(var j=0, len2=blist.length; j<len2; j++) {
                if(blist[j].test(items[i].textContent)) {
                    items[i].parentNode.parentNode.style.display = 'none'
                }
            }
        }
    }
}