PriceRangeItemHider

Hide items with price range from Ebay search results!

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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