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

Sv443 9d6f7b5deb ref: remove NODE_ENV před 1 rokem
.github 51e969ee54 chore: comments před 1 rokem
.vscode 89bacd516d chore: add setup guide & minor changes in readme před 1 rokem
assets 87757512c0 ref: rename resources to assets před 1 rokem
dist e620ea2f40 chore: build před 1 rokem
src 9d6f7b5deb ref: remove NODE_ENV před 1 rokem
.env.template 9d6f7b5deb ref: remove NODE_ENV před 1 rokem
.eslintrc.cjs a952643df7 fix: add eslint global for unsafeWindow před 1 rokem
.gitignore 3d9e3993cc chore: readme před 1 rokem
LICENSE.txt f1800d2c93 update license date před 3 roky
README.md f1111fff4a ref!: change script names před 1 rokem
changelog.md ec38e9b6b2 changelog před 1 rokem
global.d.ts 60d82ce401 fix: domain guard před 1 rokem
package-lock.json a7ccebd373 ref: serve script & add npm engines před 1 rokem
package.json f1111fff4a ref!: change script names před 1 rokem
tsconfig.json 60d82ce401 fix: domain guard před 1 rokem
webpack.config.js 4a5edc5724 ref!: rename entrypoint před 1 rokem

README.md


BetterYTM

Configurable layout and UX improvements for YouTube Music

### 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 - TODO: Quick actions on songs in a queue, to open their lyrics or remove them from the queue - Remove the "Upgrade to YT Music Premium" tab in the title bar - Set a custom size and step resolution for the volume slider - TODO: Improvements to clickability of song titles and thumbnails (to open them in a new tab better) ... 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 template for making a userscript with TypeScript and many modern language 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 `NODE_ENV` variable to enable or disable minification. If on `development` the code is readable and debuggable but also has a much bigger file size than on `production` #### These are the CLI commands available after setting up the project: | Command | Description | | --- | --- | | `npm i` | Run once to install dependencies | | `npm run lint` | Lints the userscript with ESLint | | `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` | #### Extras: When using ViolentMonkey, after running the command `npm run watch`, open [`http://localhost:8710/dist/BetterYTM.user.js`](http://localhost:8710/dist/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.

### Dependencies: This userscript depends on these libraries: - [@billjs/event-emitter](https://npmjs.org/package/@billjs/event-emitter)

### 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)