Hide eBay items with price range

Hide items with a price range from the eBay search results

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Hide eBay items with price range
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Hide items with a price range from the eBay search results
// @author       Steve Chambers
// @match        https://www.ebay.com/*
// @match        https://www.ebay.co.uk/*
// ==/UserScript==

// $("h3:contains('Show only')").parent().parent().next().prepend('<div class="cbx"><a class="cbx"><input style="margin: 0 3px 0 4px;" tabindex="-1" type="checkbox" name="LH_NoPriceRanges"><span class="cbx">No price ranges</span></input></a></div>');
$("h3:contains('Show only')").parent().parent().next().prepend('<li class="x-refine__main__list"><div><h3 class="x-refine__item"><input style="margin: 0 3px 0 4px;" tabindex="-1" type="checkbox" name="LH_NoPriceRanges"><span class="cbx">No price ranges</span></input></h3></div></li>');
$("h3:contains('Show only')").parent().parent().find('ul:first').append('<li class="x-refine__main__list"><input style="margin: 6px 6px 0 1px;" tabindex="-1" type="checkbox" name="LH_NoPriceRanges"/>No price ranges</li>');

$("input[name='LH_NoPriceRanges']").change(function() {
    $("span.prRange").closest('li.sresult').toggle(!this.checked);
    $("span.DEFAULT:contains(' to ')").closest('li.s-item').toggle(!this.checked);
});

$("input[name='LH_NoPriceRanges']").prop("checked", false).change();