// ==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
// @downloadURL none
// ==/UserScript==
$(".x-refine__left__nav").first().after('
');
$('#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();
}