YouTubeAlchemy
This userscript for YouTube offers 200+ layout changes and features such as tab view, speed control, export transcripts, square design, auto-theater mode, and much more—all easily customizable via settings panels.
Install / Use
/learn @TimMacy/YouTubeAlchemyREADME
YouTube Alchemy <a href="#-changelog"><img align="right" src="https://img.shields.io/badge/Version-10.9.1-white.svg" alt="Version: 10.9.1"></a> <a href="https://github.com/TimMacy/YouTubeAlchemy/blob/main/LICENSE"><img align="right" src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg" alt="GNU Affero General Public License v3.0"></a><a href="#"><img align="right" src="https://img.shields.io/badge/Status-Maintained-brightgreen.svg" alt="YouTube Alchemy Status: Maintained"></a>
<a href="#"><picture><source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/09f644c0-c3ee-4e13-bb73-c98c8a1cf2c0"/><img align="left" width="80px" alt="YouTube Alchemy Logo" src="https://github.com/user-attachments/assets/d87b609d-0424-41bf-80bf-8c070b1b88d2"/></picture></a> This toolkit enhances YouTube by customizing the layout and adding more than 200 native-feeling features. Designed to be resource-efficient, it leverages YouTube's built-in elements while using event listeners, timeouts, requestAnimationFrame, requestVideoFrameCallback, requestIdleCallback, and mutation observers strategically to minimize overhead. Additionally, a main settings panel and three sub-panels offer an intuitive interface for customization. YouTube Alchemy is available as a userscript or a browser extension. <br clear="left"/>
<p align="right"> <a href="https://chromewebstore.google.com/detail/youtube-alchemy/midnnobjjobpnnblnckmnkhegbnlmgkn"><img width="22%" alt="Chrome Browser Extension for YouTube Alchemy by Tim Macy" src="https://github.com/user-attachments/assets/d5abfdaa-ca15-4820-b533-85af1332ce4e"></a> <a href="https://addons.mozilla.org/en-US/firefox/addon/youtube-alchemy/"><img width="22%" alt="Firefox Browser Extension for YouTube Alchemy by Tim Macy" src="https://github.com/user-attachments/assets/025b7be1-c945-4bde-8ad3-35c8f6c6a07f"></a> <a href="https://microsoftedge.microsoft.com/addons/detail/youtube-alchemy/mbjafaicjkndopmhdapofpcemhkflmob"><img width="22%" alt="Microsoft Edge Add-ons Store Browser Extension for YouTube Alchemy by Tim Macy" src="https://github.com/user-attachments/assets/4b711841-869d-4cb4-a64e-f8ccc6dee2ea"></a> </p> <details> <summary><strong>Table of Contents</strong></summary>- 🔒 Privacy Policy
- ✨ Overview
- 📝 Transcript Exporter
- 🔗 Header Links
- 🪄 Features & Styles
- 🎨 Color Code Videos
- 🌐 Supported Languages
- 🚀 Installation & Minimum Browser Requirements
- 📜 Changelog
- ⚖️ License
- 💡 Read Aloud Speedster
- 🔸 Disclaimer
🔒 Privacy Policy
YouTube Alchemy operates completely client-side with no external dependencies. It doesn't send data to remote servers or pull resources from third parties. It leverages the browser's built-in Intl APIs, stores settings locally (via GM storage or storage.local), and reads YouTube's DOM to apply enabled features as well as layout changes. The userscript version utilizes standard metadata for updates (@updateURL, @downloadURL) and icon display (@icon). Required permissions: GM.getValue and GM.setValue for the userscript; storage and scripting for the extension; both are limited to https://*.youtube.com/*.
✨ Overview
- Main Settings Panel: Manage the Transcript Exporter and export, import, or reset settings to their defaults.
- Header Links Panel: Add custom links next to the YouTube logo and optionally hide and auto-close the Guide.
- Features & Styles Panel: Access key features like tab view, playback speed, remove 'Important' section and sort all notifications chronologically, video quality, direction buttons for playlists, prevent autoplay, hide Shorts, set default audio, subtitle, and transcript languages, disable play on hover, square design, auto-theater mode, auto-close chat windows, number of videos per row, modify or hide various UI elements, and much more.
- Color Code Videos Panel: Apply customizable borders to videos on the Home page, reflecting their age and status, and highlight the last uploaded video on the Subscriptions page with optional auto-scroll.
📝 Transcript Exporter
Adds buttons to the YouTube header to export a video's transcript to LLMs, with or without a prompt, or to download it as a text file.
- Buttons with Color-Coded Interface in the Main Settings Panel
- Button One | Green 🎧 Copies the transcript and opens NotebookLM.
- Button Two | Blue 💬 Copies the transcript with a prompt for summarizing and opens ChatGPT.
- Button Three | Orange Copies Transcript to Clipboard.
- Button Four | Red ↓ Downloads the transcript as a text file.
- Button Five | Yellow 📜 Click to Load the Transcript Manually.
- Button Six | White ⋮ Opens the main settings panel.
- Transcript Formatting: Includes timestamps, chapter headers, video title, channel name, upload date, and URL.
- Text File Naming Format
- Title - Channel.txt (default)
- Channel - Title.txt
- uploadDate - Title - Channel.txt
- uploadDate - Channel - Title.txt
[!TIP] The URLs for buttons one and two, along with all button icons, are fully customizable. If a button field is left empty, that button won’t be added to the header. The settings button reverts to its default if its field is empty. To modify the labels for NotebookLM and ChatGPT, enter "Label | domain.com" into their respective URL fields—this also updates the icons' hover text.
[!IMPORTANT] Due to the Same-Origin Policy (SOP) in web development, JavaScript cannot directly interact across different websites: i.e. while the script can copy the transcript to the clipboard from YouTube and open a link (e.g. ChatGPT or NotebookLM), the copied transcript must be pasted manually into the text field via CTRL+V (Windows/Linux) or CMD+V (macOS).
<p align="center"><img width="50%" alt="Main Settings Panel" src="https://github.com/user-attachments/assets/14733b83-677d-4689-8d4a-33ff6c08ae4d" /></p> <br>[!NOTE] Status messages for the Transcript Exporter are displayed at the button's location in the YouTube header.
<table align="center"> <tr> <td align="center"><img src="https://github.com/user-attachments/assets/c3d37e84-3d0d-48ae-a7a5-cd8aaee4d571" alt="Transcript Is Loading"></td> <td align="left">The transcript has to be loaded into the HTML before it can be used. This can take from a few milliseconds up to a couple of seconds—depending on the length of the video.</td> </tr> <tr> <td align="center"><img src="https://github.com/user-attachments/assets/e5911ba3-6039-4dd5-ab22-ffdaf02244e2" alt="Live Video, No Transcript"></td> <td align="left">YouTube live streams don't have transcripts. Wait until the stream has finished and YouTube's API has processed the video.</td> </tr> <tr> <td align="center"><img src="https://github.com/user-attachments/assets/c0096353-dade-4e33-b728-136ea6c5e774" alt="Transcript Not Available"></td> <td align="left">If the creator hasn't included captions (subtitles), YouTube's API processes the video to generate the transcript. This can take a few minutes. If speech recognition fails due to e.g. lack of clear speech or background noise, no transcript will be available.</td> </tr> <tr> <td align="center"><img src="https://github.com/user-attachments/assets/31e963fa-414c-476a-bf1c-94adf7cf9f9e" alt="Transcript Failed to Load"></td> <td align="left">If the transcript fails to load, the Transcript Exporter will terminate. Reload the page to retry.</td> </tr> </table>
🔗 Header Links
Up to ten links can be added next to the YouTube logo. An empty 'Link Text' field won't insert the link into the header. If the Guide is hidden, a replacement icon will prepend the links, while retaining the default functionality of opening and closing the sidebar.
<p align="center"><img width="50%" alt="Header Links" src="https://github.com/user-attachments/assets/f8be4335-2d6e-4e73-9c17-ad308bc7e362" /></p> <br>🪄 Features & Styles
Offers various options to customize the layout and functionality of YouTube.
General
- Move Settings Button into the YouTube Guide
- Change Opacity of Watched Videos
- Title Case Selection:
- uppercase
- lowercase
- capitalize
- normal-case (default)
- Video Quality:
- Auto (default)
- Highest Available
- 4320p - 8K
- 2160p - 4K
- 1440p - QHD
- 1080p - FHD
- 720p - HD
- 480p
