Mirror of BetterYTM's source code https://github.com/Sv443/BetterYTM

Sv443 000b6ae38e chore: build 1 gadu atpakaļ
.github 05b3f51d00 feat: add funding 1 gadu atpakaļ
.vscode 1d36fe9e37 feat: add vsc extension settings 1 gadu atpakaļ
assets 51b44ff164 ref: minor refactors all over the place 1 gadu atpakaļ
dist 000b6ae38e chore: build 1 gadu atpakaļ
src 41a5a2c9ca feat: dev mode menu commands & directives 1 gadu atpakaļ
.env.template 4d2854c984 fix: remove unnecessary env var 1 gadu atpakaļ
.eslintrc.cjs dda8ef7618 feat: silent mode for webpack 1 gadu atpakaļ
.gitignore 257e8029b3 feat: persistent build stats 1 gadu atpakaļ
LICENSE.txt f1800d2c93 update license date 3 gadi atpakaļ
README.md 2347e347ce ref: migrate to nanoevents lib 1 gadu atpakaļ
changelog.md 5ca5631d43 feat: more build info 1 gadu atpakaļ
global.d.ts 59434aca28 feat: add menu categories, scroll indicator & more 1 gadu atpakaļ
package-lock.json 2347e347ce ref: migrate to nanoevents lib 1 gadu atpakaļ
package.json 2347e347ce ref: migrate to nanoevents lib 1 gadu atpakaļ
tsconfig.json bc1ce1b75f feat: disable text selection 1 gadu atpakaļ
webpack.config.js ee2494a3f0 ref: build tools improvements 1 gadu atpakaļ

README.md


BetterYTM

### Configurable layout and UX improvements for YouTube Music [Features](#features) • [Installation](#installation) • [Development](#development) • [Attributions](#attributions) • [Disclaimers](#disclaimers)

### Features: All of these features can be toggled and configured! - Input: - Use arrow keys to skip forward or backward by 10 seconds - Switch between YouTube and YouTube Music on a video by pressing a hotkey (F9 by default) - Layout: - Open any song's lyrics on genius.com which generally has higher quality than YouTube's providers - Quick actions on songs in a queue, to quickly open their lyrics or remove them from the queue - Remove the premium tab in the sidebar - Set a custom size and step resolution for the volume slider - Improvements to clickability of song titles and thumbnails when wanting to open them in a new tab ... and more!
To toggle features on or off, install the userscript, then click the "BetterYTM" text under the logo to open the settings menu. Note that the page needs to be reloaded for the changes to take effect. My work relies on donations, so if you like this userscript please consider [supporting development ❤️](https://github.com/sponsors/Sv443)

## Installation: **Requires a userscript manager browser extension. I recommend the following:** > Firefox: [ViolentMonkey](https://addons.mozilla.org/en-US/firefox/addon/violentmonkey/) or [TamperMonkey](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/) > Chrome: [ViolentMonkey](https://chrome.google.com/webstore/detail/violentmonkey/jinjaccalgkegednnccohejagnlnfdag) or [TamperMonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) > Edge: [ViolentMonkey](https://microsoftedge.microsoft.com/addons/detail/violentmonkey/eeagobfjdenkkddmbclomhiblgggliao?hl=en-GB&gl=DE) or [TamperMonkey](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd)
Once you have the extension, click this button to install the userscript:
Note: the `unsafeWindow` grant is required due to limitations in some browsers, [see this issue for more info.](https://github.com/Sv443/BetterYTM/issues/18#show_issue)


### Development: This project is based on my extensive template for making a userscript with TypeScript and many modern language and convenience features. [Check it out here](https://github.com/Sv443/Userscript.ts) if you want to make your own userscripts! #### Setting up the project for local development: 1. Have Node.js, npm and Git installed 2. Download and extract or clone this repo 3. Open a terminal in the project root and run `npm i` 4. Copy the file `.env.template` to `.env` and modify the variables inside to your needs. #### These are the CLI commands available after setting up the project: | Command | Description | | --- | --- | | `npm i` | Run once to install dependencies | | `npm run build-prod` | Builds the userscript for production (minified) | | `npm run build-dev` | Builds the userscript for development | | `npm run dev` | Watches for any changes, then rebuilds and serves the userscript on port 8710, so it can be updated live if set up correctly in the userscript manager (see below). Configure request logging and more in `src/tools/serve.ts` | | `npm run lint` | Builds the userscript with the TypeScript compiler and lints it with ESLint | #### Extras: When using ViolentMonkey, after running the command `npm run dev`, open [`http://localhost:8710/BetterYTM.user.js`](http://localhost:8710/BetterYTM.user.js) and select the `Track local file` option. This makes it so the userscript automatically updates when the code changes. Note: the tab needs to stay open on Firefox or the script will not update itself.

### Attributions: This userscript depends on these runtime libraries: - [nanoevents](https://npmjs.org/package/nanoevents) - [@sv443-network/userutils](https://github.com/Sv443-Network/UserUtils) For development dependencies, please refer to `devDependencies` in [`package.json`](./package.json) Icons: - Most icons are from [Material Icons](https://fonts.google.com/icons) - For external icon attributions, see [`assets/external/`](assets/external/README.md)

### Disclaimers: - I am not affiliated with YouTube, Google, Alphabet, Genius, or anyone else. - I do not own any third party icons, I just re-host them here for better stability and availability. - I do not intend to ever collect any data about you, everything in this script is done and stored locally on your device or on the site it currently runs on. - I can't guarantee this software is without flaws. If something bad happens, I don't accept blame. I do however accept [bug reports and feature requests.](https://github.com/Sv443/BetterYTM/issues/new/choose)



Made with ❤️ by [Sv443](https://github.com/Sv443) If you like this userscript, please consider [supporting me](https://github.com/sponsors/Sv443) © 2022 Sv443 - [MIT license](./LICENSE.txt)