Strava Segments Scroll Fix

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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