PriceRangeItemHider

Hide items with price range from Ebay search results!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);