eBay Grid View Expander

Increase the number of items viewed per row in eBay's grid view

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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