Increase the number of items viewed per row in eBay's grid view
// ==UserScript==
// @name eBay Grid View Expander
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Increase the number of items viewed per row in eBay's grid view
// @author takanuva15
// @match https://www.ebay.com/sch/*
// @match https://www.ebay.com/str/*
// @grant GM_addStyle
// @run-at document-start
// @license MIT
// ==/UserScript==
(function() {
'use strict';
// CSS to force more columns in the grid and adjust item sizes
const customCSS = `
/* remove side margins on main search results */
:root {
--page-width-max-sv: 100vw !important;
}
/* Shrink main search results cards slightly so more fit in a row */
.srp-grid>.s-card {
width: 16.66% !important;
}
/* remove side margins on store search results */
.app-layout, .app-layout--gutters {
max-width: unset !important;
}
`;
// Inject the CSS as early as possible
if (typeof GM_addStyle !== 'undefined') {
GM_addStyle(customCSS);
} else {
const style = document.createElement('style');
style.textContent = customCSS;
document.head.appendChild(style);
}
})();