Strava Segments Scroll Fix

Adds scroll bar to the "Segments" table on cycling activities. 27/04/2026

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Strava Segments Scroll Fix
// @namespace    http://tampermonkey.net/
// @version      3.0
// @author       Strava!!!
// @license      MIT
// @description	 Adds scroll bar to the "Segments" table on cycling activities. 27/04/2026
// @match        https://www.strava.com/activities/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function applyScrollFix() {
        const table = document.querySelector('table.segments');
        if (!table || table.dataset.scrollFixApplied) return;

        table.dataset.scrollFixApplied = "true";

        const wrapper = document.createElement('div');

        // Slightly less than full viewport to match map area
        wrapper.style.maxHeight = '65vh';
        wrapper.style.overflowY = 'auto';

        table.parentNode.insertBefore(wrapper, table);
        wrapper.appendChild(table);
    }

    applyScrollFix();

    const observer = new MutationObserver(applyScrollFix);
    observer.observe(document.body, { childList: true, subtree: true });
})();