mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-09 01:31:46 +00:00
234954a86c1e00c2275a83c97eba7d9f90692732
YouTube Music
Electron wrapper around YouTube Music featuring:
- Native look & feel, aims at keeping the original interface
- Framework for custom plugins: change YouTube Music to your needs (style, content, features), enable/disable plugins in one click
Download
You can check out the latest release to quickly find the latest version.
Available plugins:
- Ad Blocker: block all ads and tracking out of the box
- No Google Login: remove Google login buttons and links from the interface
- Shortcuts: use your usual shortcuts (media keys, Ctrl/CMD + F…) to control YouTube Music
- Navigation: next/back navigation arrows directly integrated in the interface, like in your favorite browser
- Auto confirm when paused: when the "Continue Watching?" modal appears, automatically click "Yes"
Dev
git clone https://github.com/th-ch/youtube-music
cd youtube-music
yarn
yarn start
Build your own plugins
Using plugins, you can:
- manipulate the app - the
BrowserWindowfrom electron is passed to the plugin handler - change the front by manipulating the HTML/CSS
Creating a plugin
Create a folder in plugins/YOUR-PLUGIN-NAME:
- if you need to manipulate the BrowserWindow, create a file
back.jswith the following template:
module.exports = win => {
// win is the BrowserWindow object
};
- if you need to change the front, create a file
front.jswith the following template:
module.exports = () => {
// This function will be called as a preload script
// So you can use front features like `document.querySelector`
};
Common use cases
- injecting custom CSS: create a
style.cssfile in the same folder then:
const path = require("path");
const { injectCSS } = require("../utils");
// back.js
module.exports = win => {
injectCSS(win.webContents, path.join(__dirname, "style.css"));
};
- changing the HTML:
// front.js
module.exports = () => {
// Remove the login button
document.querySelector(".sign-in-link.ytmusic-nav-bar").remove();
};
- communicating between the front and back: can be done using the ipcMain module from electron. See
utils.jsfile and example innavigationplugin.
Build
npm run build
Builds the app for macOS, Linux, and Windows, using electron-builder.
License
MIT © th-ch
Description
YouTube Music Desktop App bundled with custom plugins
adblockerdesktop-appelectronlinuxmacmacosxmusicmusic-playermusic-player-applicationnodewindowsyoutubeyoutube-musicyoutube-music-playeryoutube-playeryoutube-playlist
Readme
39 MiB
Languages
TypeScript
89.4%
JavaScript
5.5%
CSS
4.7%
HTML
0.4%
