Hides games priced below $5.00 on Steam's search page by default. (Can be personalized)
当前为
// ==UserScript==
// @name ::Steam Search: Hide Games Under Minimum Price::(2025)
// @namespace masterofobzene-Hide Games Under Minimum Price
// @version 1.0
// @description Hides games priced below $5.00 on Steam's search page by default. (Can be personalized)
// @author masterofobzene
// @icon https://store.steampowered.com/favicon.ico
// @match https://store.steampowered.com/search*
// @license MIT
// @grant none
// ==/UserScript==
(function() {
'use strict';
function hideLowPriceGames() {
document.querySelectorAll('.search_result_row').forEach(row => {
const priceElement = row.querySelector('.discount_final_price');
if (!priceElement) return;
const priceText = priceElement.textContent.trim();
// Handle free games
if (/free/i.test(priceText)) {
row.style.display = 'none';
return;
}
// Extract price value
const priceMatch = priceText.match(/\$(\d+\.\d{2})/);
if (!priceMatch) return;
const price = parseFloat(priceMatch[1]);
if (price < 5.00) {
row.style.display = 'none';
}
});
}
// Set up MutationObserver for dynamic content
const resultsContainer = document.getElementById('search_resultsRows');
if (resultsContainer) {
const observer = new MutationObserver(hideLowPriceGames);
observer.observe(resultsContainer, {
childList: true,
subtree: true
});
}
// Initial run
hideLowPriceGames();
})();