Skip to content

Instantly share code, notes, and snippets.

@olisolomons
Created August 14, 2025 10:32
Show Gist options
  • Select an option

  • Save olisolomons/3decff25574780529eb64545c226e429 to your computer and use it in GitHub Desktop.

Select an option

Save olisolomons/3decff25574780529eb64545c226e429 to your computer and use it in GitHub Desktop.
Do people actually buy new stuff on eBay?
// ==UserScript==
// @name eBay Used Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically selects the "Used" filter on eBay search pages.
// @author You
// @match https://*.ebay.co.uk/sch/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Get the current URL
const currentUrl = window.location.href;
// Check if the URL is an eBay search page and doesn't already have the "used" filter
if (currentUrl.includes('/sch/') && !currentUrl.includes('LH_ItemCondition=3000')) {
// Construct the new URL with the "used" filter
let newUrl = currentUrl;
if (currentUrl.includes('?')) {
// If there are already query parameters, add the filter with an ampersand
newUrl += '&LH_ItemCondition=3000';
} else {
// If there are no query parameters, add the filter with a question mark
newUrl += '?LH_ItemCondition=3000';
}
// Redirect to the new URL
window.location.replace(newUrl);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment