PriceRangeItemHider

Hide items with price range from Ebay search results!

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

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

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.

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

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         PriceRangeItemHider
// @namespace    http://tampermonkey.net/
// @version      2024-03-19
// @description  Hide items with price range from Ebay search results!
// @author       Lars Simonsen
// @match        www.ebay.com/*
// @license MIT
// ==/UserScript==

$('head').append('<style>.hiddenRangeItem {background-color:#eee;} .showHiddenRangeItem {cursor:pointer; background-color:#eee; border: 1px solid #ddd; margin: 1em; padding:0.25em; } .showHiddenRangeItem.showing { color:white;background-color:black; } .showHiddenRangeItem.hiding .hideIt, .showHiddenRangeItem.showing .showIt { display:none;}</style>');
function hideRangeItem($el) {
    $el.addClass('hiddenRangeItem').hide().before('<div class="showHiddenRangeItem hiding"><span class="showIt">Show</span><span class="hideIt">Hide</span> price range item</div>');
    $el.prev('.showHiddenRangeItem').click(function() {
        $(this).toggleClass('showing hiding').next('.hiddenRangeItem').slideToggle();
    });
}
function hideRangeItems($els) {
    $els.each(function() {
        if (!$(this).hasClass('hiddenRangeItem')) {
            hideRangeItem($(this));
        }
    });
}
setInterval(function() {
    hideRangeItems($('#Results .prRange').parents('.sresult,.srp-results'));
    hideRangeItems($('.DEFAULT:contains( to )').parents('.s-item'));
}, 1000);