eBay Hide Price Range and Show Sold

Add menu to hide range items and items without Sold quantity

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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();
}