{"id":27784537,"url":"https://github.com/jerboa88/better-segments-for-strava","last_synced_at":"2025-04-30T14:28:33.004Z","repository":{"id":288861209,"uuid":"968879654","full_name":"jerboa88/better-segments-for-strava","owner":"jerboa88","description":"A userscript for Strava that adds additional stats and features to the starred segments page.","archived":false,"fork":false,"pushed_at":"2025-04-28T00:25:13.000Z","size":271,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T14:28:26.868Z","etag":null,"topics":["fitness","javascript","segments","strava","user-script","user-scripts","userscript","userscripts"],"latest_commit_sha":null,"homepage":"https://johng.io/p/better-segments-for-strava","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jerboa88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-18T22:53:55.000Z","updated_at":"2025-04-28T00:25:16.000Z","dependencies_parsed_at":"2025-04-28T01:23:05.555Z","dependency_job_id":null,"html_url":"https://github.com/jerboa88/better-segments-for-strava","commit_stats":null,"previous_names":["jerboa88/better-segments-for-strava"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerboa88%2Fbetter-segments-for-strava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerboa88%2Fbetter-segments-for-strava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerboa88%2Fbetter-segments-for-strava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerboa88%2Fbetter-segments-for-strava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerboa88","download_url":"https://codeload.github.com/jerboa88/better-segments-for-strava/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251721200,"owners_count":21632783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fitness","javascript","segments","strava","user-script","user-scripts","userscript","userscripts"],"created_at":"2025-04-30T14:28:32.183Z","updated_at":"2025-04-30T14:28:32.997Z","avatar_url":"https://github.com/jerboa88.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Project Header --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg class=\"projectLogo\" src=\"logo.svg\" alt=\"Project logo\" title=\"Project logo\" width=\"256\"\u003e\n\n  \u003ch1 class=\"projectName\"\u003eBetter Segments for Strava\u003c/h1\u003e\n\n  \u003cp class=\"projectBadges\"\u003e\n    \u003cimg src=\"https://johng.io/badges/category/Script.svg\" alt=\"Project category\" title=\"Project category\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/top/jerboa88/better-segments-for-strava.svg\" alt=\"Language\" title=\"Language\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/repo-size/jerboa88/better-segments-for-strava.svg\" alt=\"Repository size\" title=\"Repository size\"\u003e\n    \u003ca href=\"LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/jerboa88/better-segments-for-strava.svg\" alt=\"Project license\" title=\"Project license\"/\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp class=\"projectDesc\"\u003e\n    A userscript for Strava that adds additional stats and features to the starred segments page.\n  \u003c/p\u003e\n\n  \u003cbr/\u003e\n\u003c/div\u003e\n\n\n## About\nHunting for [Strava] crowns? This script may help. It runs in your browser and adds additional stats and features to the [starred segments page] on Strava to help you find segments that you already hold a competitive time on.\n\n### Features\n- **📄 Configurable # of items per page**: Increase the number of segments shown per page from the default 20 up to 200\n- **🚻 Configurable gender for comparison**: Compare your PR against the segment record for men, women, or the fastest time overall\n- **↕️ Sortable columns**: Sort the table by any column in ascending or descending order\n- **🎨 Color-coded values**: Differences between your time and the segment record are color-coded to help you quickly identify segments where you hold a competitive time\n- **➕ Additional columns**:\n  - **Absolute difference**: View the difference between your time and the segment record in seconds\n  - **Relative difference**: View the difference between your time and the segment record as a percentage\n\n### Screenshots\n| ![Screenshot of the starred segments page with the script running](screenshot.png) |\n| ---------------------------------------------------------------------------------- |\n| _Starred segments page ([strava.com/athlete/segments/starred]) - v0.1.1_           |\n\n\n## Installation\n\u003e [!CAUTION]\n\u003e For security reasons, I do not recommend running scripts from the internet unless you understand what they are doing. If you are not a developer, I recommend reading the comments in the code and/or asking a LLM like [ChatGPT] or [Claude] to explain it to you.\n\n\nI recommend using this script with a userscript manager because it will keep the script up-to-date and run it automatically when you visit the appropriate page. If you don't want to do that, you can also run it manually.\n\n### Using a userscript manager\nA userscript manager is a browser extension that allows you to organize and run scripts on websites. If you don't already have one, I would recommend [Violentmonkey], [Tampermonkey], or [Greasemonkey]. Once installed, you can click the button below to install the script.\n\n[![Install](https://img.shields.io/badge/%F0%9F%A7%A9_Install-better--segments--for--strava.user.js-blue)](https://github.com/jerboa88/better-segments-for-strava/raw/refs/heads/main/better-segments-for-strava.user.js)\n\n### Manually\n\u003e [!NOTE]\n\u003e This only works once. If the page gets reloaded (ex. by changing the # of items per page) or you navigate away and come back, you will have to run the script again. If you want to run the script automatically, I suggest using a userscript manager.\n\nAlternatively, you can run the script by going to [strava.com/athlete/segments/starred], copying the code in [better-segments-for-strava.user.js], and pasting it into your browser's devtools console.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eDetailed instructions:\u003c/b\u003e\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003eOpen \u003ca href=\"https://www.strava.com/athlete/segments/starred\"\u003estrava.com/athlete/segments/starred\u003c/a\u003e in your browser\u003c/li\u003e\n    \u003cli\u003eOpen your browser's devtools console (\u003ca href=\"https://balsamiq.com/support/faqs/browserconsole/\"\u003ehow?\u003c/a\u003e)\u003c/li\u003e\n    \u003cli\u003eCopy the code in \u003ca href=\"better-segments-for-strava.user.js\"\u003ebetter-segments-for-strava.user.js\u003c/a\u003e and paste it into the console. If this doesn't work or you see a warning message about pasting, see the \u003ca href=\"#FAQ\"\u003eFAQ\u003c/a\u003e.\u003c/li\u003e\n    \u003cli\u003ePress enter to run the script. You should see the page update. If this doesn't happen, see the \u003ca href=\"#FAQ\"\u003eFAQ\u003c/a\u003e.\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n## Usage\nThis script only works on the starred segments page, so you will need to star segments that you want to track.\n\n### Setting the number of items per page\nBy default, Strava only shows 20 segments per page. You can use the `Items per Page` dropdown to change this to 50, 100, or 200. This will reload the page.\n\n### Setting gender for comparison\nThe script doesn't know your gender, so it defaults to using the fastest time overall to calculate differences. You can use the `Compare with Gender` dropdown to change the gender used for comparison.\n\n### Sorting\n\u003e [!NOTE]\n\u003e Sorting only applies to the current page of results. If you want to sort the entire list, you will need to increase the number of items per page so that all segments are shown on a single page.\n\nClick on the column headers to sort the table. Clicking on the same column header again will reverse the sort order.\n\n### Color coding\nDifferences between your time and the record time are color coded, with warmer colors indicating a slower time and cooler colors indicating a faster time:\n|                    🟣🔵 |      🟢      | 🟡🟠🔴                 |\n| --------------------: | :---------: | ------------------- |\n| \u003c0% (ahead of leader) | 0% (leader) | \u003e0% (behind leader) |\n\n\n## FAQ\n\n### Nothing shows up when I paste in the console / I get a warning when I try to paste in the console\nSome browsers prevent you from pasting code in the console because it could be malicious. This is called Paste Protection and you can read more about it on the [Chrome for Developers Blog].\n\nIf this happens, follow the instructions in the console to re-enable pasting, and then try again. For Chrome, the following steps should work:\n 1. Try to paste something in the console. You should get a warning message about pasting\n 2. Type \"allow pasting\" in the console and press enter\n\n See [this video] for a visual walkthrough.\n\n### I get an `Uncaught SyntaxError: Unexpected identifier` error when running the script\nMake sure that you select the entire file with \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eA\u003c/kbd\u003e when copying it. If part of the script is cut off, it won't work.\n\n\n## Contributing\nIf you encounter any problems with the script, feel free to [create an issue].\n\nPull requests, bug reports, translations, and other kinds of contributions are greatly appreciated. By contributing code, you agree to license your contributions under the terms of the [LICENSE].\n\n\n## License\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\nThe project logo is based on [vip-crown-line] by [Remix Icon],\nlicensed under [Apache License 2.0]. I have added start and end points to the line below the crown.\n\nThis project is not affiliated with or endorsed by Strava in any way.\n\n\n[Apache License 2.0]: https://github.com/Remix-Design/remixicon/blob/master/License\n[better-segments-for-strava.user.js]: better-segments-for-strava.user.js\n[ChatGPT]: https://chatgpt.com/\n[Chrome for Developers Blog]: https://developer.chrome.com/blog/self-xss\n[Claude]: https://claude.ai\n[create an issue]: https://github.com/jerboa88/better-segments-for-strava/issues\n[Greasemonkey]: https://github.com/greasemonkey/greasemonkey\n[LICENSE]: LICENSE\n[Remix Icon]: https://remixicon.com/]\n[starred segments page]: https://www.strava.com/athlete/segments/starred\n[strava.com/athlete/segments/starred]: https://www.strava.com/athlete/segments/starred\n[Strava]: https://strava.com\n[Tampermonkey]: https://www.tampermonkey.net/index.php\n[this video]: https://youtu.be/X5uyCtVD1-o?si=AOrzgez90KiDlA-z\u0026t=11\n[Violentmonkey]: https://violentmonkey.github.io/\n[vip-crown-line]: https://remixicon.com/icon/vip-crown-line\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerboa88%2Fbetter-segments-for-strava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerboa88%2Fbetter-segments-for-strava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerboa88%2Fbetter-segments-for-strava/lists"}