eBay Grid View Expander

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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);
    }
})();