Reddit Bigger Carousel

Modifies the Reddit's carousel to change the carousel height

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            Reddit Bigger Carousel
// @description     Modifies the Reddit's carousel to change the carousel height
// @version         1.0.0
// @author          BreatFR
// @match           https://www.reddit.com/*
// @copyright       2025, BreatFR (https://breat.fr)
// @grant           none
// @namespace       https://gitlab.com/breatfr
// @homepageURL     https://gitlab.com/breatfr/reddit
// @icon            https://www.redditstatic.com/shreddit/assets/favicon/192x192.png
// @supportURL      https://discord.gg/Q8KSHzdBxs
// @license         AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
// ==/UserScript==

(function() {
    'use strict';

    // Function to modify the carousel-style attribute
    function modifyCarouselStyle() {
        // Select all elements with the carousel-style attribute
        const carouselElements = document.querySelectorAll('[carousel-style]');

        carouselElements.forEach(element => {
            // Replace the value of the carousel-style attribute
            const currentStyle = element.getAttribute('carousel-style');
            const newStyle = currentStyle.replace(/max-height:\s*\d+px;/, 'max-height: 100%;');
            element.setAttribute('carousel-style', newStyle);
        });
    }

    // Execute the function after the page loads
    window.addEventListener('load', modifyCarouselStyle);

    // Execute the function periodically every 500 milliseconds
    setInterval(modifyCarouselStyle, 500);
})();