Greasy Fork

来自缓存

Greasy Fork is available in English.

eBay Hide Price Range and Show Sold

Add menu to hide range items and items without Sold quantity

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         eBay Hide Price Range and Show Sold
// @namespace    JoseScript
// @version      2.0
// @description  Add menu to hide range items and items without Sold quantity
// @author       Jose Araujo
// @match        http*://www.ebay.com/sch/*
// @run-at       document-end
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// ==/UserScript==

$(".x-refine__left__nav").first().after('<li class="x-refine__main__list "><div><h3 class="x-refine__item">Filter</h3><div class="cbx"><input class="cbx hiderangeitems" name="hiderangeitems" type="checkbox"><span class="cbx">Hide Price Range Items</span></div><div class="cbx"><input class="cbx showonlysold" name="showonlysold" type="checkbox"><span class="cbx">Show Only Sold Items</span></div></div></li>');
$('#Results .prRange').parents('.sresult').addClass('rangeitem');
$('.DEFAULT:contains( to )').parents('.s-item').addClass('rangeitem');
$("#Results .lvextras:not(:contains('Sold'))").parents('.sresult').addClass('nosolditem');
$('li.s-item:not(:contains("Sold"))').addClass('nosolditem');

$('.hiderangeitems').click(updateFilter);
$('.showonlysold').click(updateFilter);

function updateFilter() {
    $(".rangeitem").show();
    $(".nosolditem").show();  
    if($(".hiderangeitems").is(":checked")) 
       $(".rangeitem").hide();
    if($(".showonlysold").is(":checked")) 
       $(".nosolditem").hide();
}