Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
Version 3.0.6 - Reformatted code.
Browse files Browse the repository at this point in the history
  • Loading branch information
honzawashere authored Nov 18, 2023
1 parent 206bf57 commit 9381b60
Show file tree
Hide file tree
Showing 63 changed files with 776 additions and 600 deletions.
23 changes: 5 additions & 18 deletions scripts/database/PluginManager.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,38 @@
const store = require("electron-store");
const {dialog} = require("electron");
module.exports.createDatabase = () => {
const pkg = require("../../package.json")
const store = require("electron-store")
const pkg = require("../../package.json")
const store = require("electron-store")

module.exports.createDatabase = () => {
const db = new store()

if(db.get("app.version") !== pkg.version || db.get("app.version") === undefined) {
db.set("app.version", pkg.version)
dialog.showMessageBox( { message: "Settings got moved. Now you can find them when you click on settings icon, or your profile icon and go to \"App Settings\" section.", title: "YouTube Music", buttons: ["OK"]})
}

return db
}

module.exports.get = (name) => {
const store = require("electron-store")

const db = new store()
return db.get("app.plugins." + name) === true
}

module.exports.getJSON = () => {
const store = require("electron-store")

const db = new store()
return db.store
}

module.exports.set = (name, value) => {
const store = require("electron-store")

const db = new store()
return db.set("app.plugins." + name, value)
}

module.exports.getLastSongInfo = () => {
const store = require("electron-store")

const db = new store()
return db.get("app.songInfo")
}

module.exports.setLastSongInfoDB = (value, time, list) => {
const store = require("electron-store")

const info = { info: value, time: time, list: list }
module.exports.setLastSongInfoDB = (songInfo, time, list) => {
const info = { info: songInfo, time: time, list: list }

const db = new store()
return db.set("app.songInfo", info)
Expand Down
5 changes: 5 additions & 0 deletions scripts/web/CSS/AmbientModeCSS.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports.load = (window) => {
window.webContents.insertCSS(`
.ambient-mode-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; filter: blur(100px); z-index: -2; }
`)
}
24 changes: 17 additions & 7 deletions scripts/web/CSS/ColorChangerCSS.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
module.exports.info = {
name: "ColorChangerCSS"
}

module.exports.load = (window) => {
window.webContents.insertCSS(`
ytmusic-app-layout[player-page-open] #nav-bar-background.ytmusic-app-layout { background: var(--ytmusic-track-color2) !important }
ytmusic-player-page { background: var(--ytmusic-track-color2) !important }
ytmusic-app-layout[player-page-open] ytmusic-app[is-bauhaus-sidenav-enabled] #guide-wrapper.ytmusic-app { background: var(--ytmusic-track-color2) !important }
html { --ytmusic-track-color1: black; --ytmusic-track-color2: black; --ytmusic-playlist-color: black; }
ytmusic-app-layout[player-page-open] #nav-bar-background.ytmusic-app-layout { background: var(--ytmusic-track-color2) !important }
tp-yt-paper-toast { background: var(--ytmusic-track-color2) !important }
ytmusic-app-layout[player-page-open] ytmusic-guide-renderer { background: var(--ytmusic-track-color2) !important }
ytmusic-app-layout[player-page-open] #nav-bar-background.ytmusic-app-layout { left: 0 !important }
ytmusic-app-layout[player-visible] > [slot=player-bar], ytmusic-app-layout[player-visible] #player-bar-background.ytmusic-app-layout { background: var(--ytmusic-track-color1) !important; }
.html5-video-player:not(.ytp-transparent), .html5-video-player.unstarted-mode, .html5-video-player.ad-showing, .html5-video-player.ended-mode { background: var(--ytmusic-track-color2) !important }
ytmusic-player[player-ui-state="FULLSCREEN"] .html5-video-player, ytmusic-player[player-ui-state="MINIPLAYER"] .html5-video-player { background-color: black !important; }
.html5-video-player:not(.ytp-transparent), .html5-video-player.unstarted-mode, .html5-video-player.ad-showing, .html5-video-player.ended-mode { background: transparent !important }
ytmusic-player[player-ui-state="FULLSCREEN"] .html5-video-player, ytmusic-player[player-ui-state="MINIPLAYER"] .html5-video-player { background-color: transparent !important; }
ytmusic-app-layout[player-visible] > [slot=player-bar], ytmusic-app-layout[player-visible] .ytmusic-menu-popup-renderer { --paper-listbox-background-color: var(--ytmusic-track-color2) !important }
.duration.ytmusic-player-queue-item, .byline.ytmusic-player-queue-item { color: #ffffffb3 !important }
.autoplay.ytmusic-tab-renderer .subtitle.ytmusic-tab-renderer { color: #ffffffb3 !important }
.av-toggle.ytmusic-av-toggle { background: var(--ytmusic-track-color1) !important; }
.song-button.ytmusic-av-toggle, .video-button.ytmusic-av-toggle { background: var(--ytmusic-track-color1) !important; }
ytmusic-av-toggle[playback-mode=ATV_PREFERRED] .song-button.ytmusic-av-toggle, ytmusic-av-toggle[playback-mode=OMV_PREFERRED] .video-button.ytmusic-av-toggle { background-color: var(--ytmusic-av-toggle-active) !important; }
ytmusic-app-layout[player-visible] #player-bar-background.ytmusic-app-layout { background: black !important; }
ytmusic-app-layout[player-page-open] #player-bar-background.ytmusic-app-layout { background: transparent !important; }
ytmusic-app-layout[player-visible] ytmusic-player-bar { background: black !important; }
ytmusic-app-layout[player-page-open] ytmusic-player-bar { background: transparent !important; }
ytmusic-guide-renderer { background: transparent !important; }
ytmusic-app-layout[player-page-open] #nav-bar-background.ytmusic-app-layout { background: transparent !important }
ytmusic-app-layout[is-bauhaus-sidenav-enabled] #mini-guide-background.ytmusic-app-layout { background: transparent !important }
ytmusic-player-page { background: transparent !important }
ytmusic-app-layout[player-page-open] { position: absolute; width: 100%; height: 100%; display: block; opacity: 1; background: linear-gradient(180deg,var(--ytmusic-track-color1) 0%, black 120%); overflow: hidden !important }
`)
}
4 changes: 4 additions & 0 deletions scripts/web/CSS/ConsentCSS.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module.exports.info = {
name: "ConsentCSS"
}

module.exports.load = (window) => {
window.webContents.insertCSS(`
body#yDmH0d { background: #0e0e0e !important}
Expand Down
20 changes: 17 additions & 3 deletions scripts/web/CSS/HomepageCSS.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports.info = {
name: "HomePageCSS",
name: "HomepageCSS",
}

module.exports.load = (window) => {
window.webContents.insertCSS(`ytmusic-nav-bar[is-bauhaus-sidenav-enabled] .right-content.ytmusic-nav-bar { padding-right: 30px !important }
ytmusic-cast-button { display: none !important } ytmusic-nav-bar[is-bauhaus-sidenav-enabled] .right-content.ytmusic-nav-bar { right: 0px !important }
ytmusic-app[is-bauhaus-sidenav-enabled] #guide-wrapper.ytmusic-app { background: var(--ytmusic-nav-bar) !important; border-right: 0px solid transparent !important }
ytmusic-app[is-bauhaus-sidenav-enabled] #guide-wrapper.ytmusic-app { background: transparent !important; border-right: 0px solid transparent !important }
ytmusic-app-layout[is-bauhaus-sidenav-enabled] #nav-bar-background.ytmusic-app-layout { border-bottom: 0px solid transparent !important; transition: opacity 0s !important; }
ytmusic-app-layout[is-bauhaus-sidenav-enabled] #nav-bar-divider.ytmusic-app-layout { border-top: 0px solid transparent !important }
ytmusic-app-layout[is-bauhaus-sidenav-enabled] #mini-guide-background.ytmusic-app-layout {border-right: 0px solid transparent !important }
Expand All @@ -15,7 +15,7 @@ module.exports.load = (window) => {
.title.ytmusic-carousel-shelf-basic-header-renderer { font-size: 25px !important }
#contents.ytmusic-section-list-renderer>ytmusic-carousel-shelf-renderer.ytmusic-section-list-renderer:not(:last-child), #contents.ytmusic-section-list-renderer>ytmusic-immersive-carousel-shelf-renderer.ytmusic-section-list-renderer:not(:last-child) { margin-bottom: 0px !important }
ytmusic-mealbar-promo-renderer[dialog][dialog][dialog] { display: none !important }
div#guide-content { background: black !important }
div#guide-content { background: transparent !important }
tp-yt-paper-listbox.ytmusic-menu-popup-renderer { border: 1px solid transparent !important; border-radius: 8px !important }
.yt-simple-endpoint, .logo.ytmusic-logo { -webkit-user-drag: none !important }
ytmusic-app-layout[player-page-open] ytmusic-search-box[is-bauhaus-sidenav-enabled][opened] .search-box.ytmusic-search-box, ytmusic-app-layout[player-page-open] ytmusic-search-box[is-bauhaus-sidenav-enabled] #suggestion-list.ytmusic-search-box, ytmusic-app-layout[player-page-open] ytmusic-search-suggestion { background: var(--ytmusic-track-color1) !important }
Expand All @@ -32,5 +32,19 @@ module.exports.load = (window) => {
.content.ytmusic-tabbed-search-results-renderer { padding: 8px 0 0 !important }
ytmusic-search-box { box-shadow: none !important; }
.menu.ytmusic-player-bar { --iron-icon-fill-color: #ffffff !important; }
ytd-multi-page-menu-renderer.ytmusic-popup-container { background: var(--ytmusic-track-color2) !important;--yt-spec-call-to-action: white !important;--yt-endpoint-hover-color: lightgrey !important; }
yt-icon.style-scope.ytd-compact-link-renderer { color: white !important }
ytmusic-app-layout[not-maximized] div#playlists {height: calc(100% - 75px);overflow-y: scroll;}
ytmusic-nav-bar[is-bauhaus-sidenav-enabled][is-search-page] .center-content.ytmusic-nav-bar { width: 80% !important }
.content.ytmusic-tabbed-search-results-renderer { margin: 0 0 !important }
.tab-container.ytmusic-tabs { margin: 0 0 !important }
#chips.ytmusic-chip-cloud-renderer { margin-left: 40px !important }
ytmusic-tabs { margin-left: 40px; }
ytmusic-chip-cloud-renderer.ytmusic-section-list-renderer { margin: 0 0 !important }
.strapline.ytmusic-carousel-shelf-basic-header-renderer, .strapline.ytmusic-shelf-renderer { color: #ffffffb3 !important }
.tab.ytmusic-tabs {text-transform: capitalize !important;}
ytmusic-section-list-renderer[page-type=MUSIC_PAGE_TYPE_LIBRARY_CONTENT_LANDING_PAGE] ytmusic-side-aligned-item-renderer.ytmusic-section-list-renderer, ytmusic-section-list-renderer[page-type=MUSIC_PAGE_TYPE_DOWNLOADS_CONTENT_LANDING_PAGE] ytmusic-side-aligned-item-renderer.ytmusic-section-list-renderer, ytmusic-section-list-renderer[page-type=MUSIC_PAGE_TYPE_PRIVATELY_OWNED_CONTENT_LANDING_PAGE] ytmusic-side-aligned-item-renderer.ytmusic-section-list-renderer { margin: 26px 0 36px !important; }
#container.ytmusic-multi-select-menu-renderer { border-radius: 16px !important; background: #0e0e0e !important}
#items.ytmusic-multi-select-menu-renderer {background: #0e0e0e !important}
`)
}
8 changes: 5 additions & 3 deletions scripts/web/CSS/PlayerCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ module.exports.load = (window) => {
.content.ytmusic-player-page { padding: 32px var(--ytmusic-player-page-horizontal-padding) 32px !important; }
.description.ytmusic-description-shelf-renderer { font-size: 18px !important; font-weight: 500 !important }
.video-disable-performance { width: 0px !important; height: 0px !important }
.autoplay.ytmusic-player-queue { display: none !important }
.ytp-player-content.ytp-iv-player-content { display: none !important }
tp-yt-paper-tab tp-yt-paper-tab .tp-yt-paper-tab[style-target=tab-content], .tp-yt-paper-tab[style-target=tab-content] { text-transform: none; font-size: 15px; }
ytmusic-app-layout[player-fullscreened] > [slot=player-bar] { width: 100% !important; }
.ytp-chrome-top-buttons { display: none !important }
#buttons.ytmusic-queue-header-renderer { margin-left: 10px !important }
button.yt-spec-button-shape-next.yt-spec-button-shape-next--filled.yt-spec-button-shape-next--call-to-action.yt-spec-button-shape-next--size-m { margin-top: 10px !important }
.song-media-controls.ytmusic-player { padding: 0px !important; position: absolute; top: 50% !important; left: 50% !important; transform: translate(-50%,-50%) !important }
.top-row-buttons.ytmusic-player {margin-top: 8px !important; margin-right: 8px !important;}
ytmusic-player-bar[player-fullscreened_] { --ytmusic-player-bar-height: 72px !important; --ytmusic-like-button-size: none !important; --ytmusic-menu-renderer-button-size: none !important; }
.thumbnail-overlay.ytmusic-player-queue-item[play-button-state=loading], .thumbnail-overlay.ytmusic-player-queue-item[play-button-state=playing], .thumbnail-overlay.ytmusic-player-queue-item[play-button-state=paused] { opacity: 0 !important }
Expand All @@ -36,10 +34,14 @@ module.exports.load = (window) => {
.song-info-container {position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);}
.song-image-container {width: 300px;height: 300px}
.song-image-container img {width: auto;height: 300px;border:1px solid transparent;border-radius:8px;position:absolute;left: 50%;transform:translate(-50%)}
ytmusic-player {background-color: black !important}
ytmusic-player {background-color: transparent !important}
.song-data-container h1 {text-align: center;padding: 10px 0px 0px;font-size: 26px;font-weight: 400;}
.song-data-container h3 {text-align: center;padding: 0px;font-size: 20px;font-weight: 400;color: #ffffffd8;}
ytmusic-player-page[player-fullscreened_] .av.ytmusic-player-page { visibility: hidden !important }
ytmusic-app-layout[player-fullscreened] div#fullscreen-container {display: block;}
ytmusic-player-page[player-fullscreened] .side-panel.ytmusic-player-page {display: none;}
.autoplay.ytmusic-player-queue .title.ytmusic-player-queue { opacity: 1 !important; color: white }
ytmusic-app-layout[player-page-open] ytmusic-carousel-shelf-renderer { margin-left: 0px !important }
ytmusic-app-layout[player-page-open] iron-selector#chips { margin-left: 0px !important; }
`)
}
16 changes: 15 additions & 1 deletion scripts/web/CSS/PlaylistsCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ module.exports.load = (window) => {
"#contents.ytmusic-playlist-shelf-renderer>*.ytmusic-playlist-shelf-renderer:not(:last-child) { border-bottom: 1px solid transparent !important }",
"ytmusic-app-layout[player-page-open] .ytmusic-app-content {display: none;}",
"ytmusic-app-layout[player-page-open] ytmusic-app-layout > [slot=player-bar] {width: 100vw !important;}",
"ytmusic-detail-header-renderer { background: linear-gradient(180deg, var(--ytmusic-playlist-color), transparent) !important } "
"ytmusic-detail-header-renderer { background: linear-gradient(180deg, var(--ytmusic-playlist-color), transparent) !important }",
"ytmusic-browse-response[is-bauhaus-sidenav-enabled] #header.ytmusic-browse-response ytmusic-header-renderer.ytmusic-browse-response, ytmusic-browse-response[is-bauhaus-sidenav-enabled] #header.ytmusic-browse-response ytmusic-detail-header-renderer.ytmusic-browse-response, ytmusic-browse-response[is-bauhaus-sidenav-enabled] #header.ytmusic-browse-response ytmusic-editable-playlist-detail-header-renderer.ytmusic-browse-response, ytmusic-browse-response[is-bauhaus-sidenav-enabled] #header.ytmusic-browse-response ytmusic-migration-header-renderer.ytmusic-browse-response {padding-left:0px !important;margin-left:var(--ytmusic-guide-width) !important}",
"ytmusic-playlist-form { background: var(--ytmusic-playlist-color-darker) !important; border-radius: 16px !important }",
".content-container.ytmusic-detail-header-renderer { margin: var(--ytmusic-divider-height) 40px 0 !important}",
"#contents.ytmusic-section-list-renderer>*.ytmusic-section-list-renderer:not(.fullbleed) { margin-left: 40px !important}",
"ytmusic-carousel-shelf-renderer { margin-left: -100px; position: relative; }",
".image.ytmusic-visual-header-renderer { left: 240px }",
"ytmusic-immersive-header-renderer[is-bauhaus-sidenav-enabled] .image.ytmusic-immersive-header-renderer { margin-left: 240px !important }",
"ytmusic-carousel-shelf-renderer.style-scope.ytmusic-add-to-playlist-renderer { margin-left: 0 !important }",
"ytmusic-carousel-shelf-renderer.ytmusic-add-to-playlist-renderer { padding: 0 20px !important }",
"ytmusic-add-to-playlist-renderer.style-scope.ytmusic-popup-container { margin: 0 !important }",
"yt-icon.ytmusic-playlist-add-to-option-renderer { color: white !important }",
".section-heading.ytmusic-add-to-playlist-renderer { font-size: 16px !important }",
"ytmusic-add-to-playlist-renderer { background: #0e0e0e !important; border: 1px solid transparent !important; border-radius: 16px !important }",
"tp-yt-paper-dialog { background: #0e0e0e !important; border-radius: 16px}"
].join("\n"))
}
10 changes: 7 additions & 3 deletions scripts/web/CSS/PluginsMenuCSS.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
module.exports.info = {
name: "PluginsMenuCSS"
}

module.exports.load = (window) => {
window.webContents.insertCSS(`
.hidden { display: none }
.plugins-menu {top: 0;position: fixed;width: 100%;height: 100%;z-index: 103;background: #000000b3;}
.plugins-dialog {position: fixed;top: 50%;left: 50%;width: 50%;height: 50%;background:var(--ytmusic-track-color1);transform: translate(-50%,-50%);border:1px solid transparent;border-radius: 8px;}
.plugins-title {height: 15%; border-bottom: 1px solid white; padding: 0px 20px;padding-bottom: 0;height: 10%;}
.plugins-title h1 {font-size: 20px !important;color:white;font-family: 'Roboto';font-weight: 400;position:relative;margin:0;color:white;border-bottom:white;width:fit-content;margin-top:15px}
.close-menu {width: 24px;height: 24px;position: absolute;top:10px;right:20px}
.plugins-options {color: white;font-family: 'Roboto';position: absolute;top: 15%;bottom: 0;width: 20%;border-right: 1px solid white}
.close-menu {width: 24px;height: 24px;position: absolute;top:15px;right:20px}
.plugins-options {color: white;font-family: 'Roboto';position: absolute;top: calc(10% + 15px);bottom: 0;width: 20%;border-right: 1px solid white}
.option {width: 100%;margin: auto;height: 48px;}
.option:hover {background: #ffffffb3;color:var(--ytmusic-track-color1);cursor: pointer;}
.option-selected { background:#ffffffa6;color:var(--ytmusic-track-color1);}
.option h1 {font-size: 15px;font-weight: 400;margin: 0;position: relative;top: 50%;transform: translate(20px,-50%);}
.tab {position: absolute;top: 15%;bottom: 0;left: 20%;right: 0;}
.tabxd {position: absolute;top: 15%;bottom: 0;left: 20%;right: 0;}
.tabc {padding: 0 20px !important;height: 100%;overflow-y: scroll;}
.section h1 {color: white;border-bottom: 1px solid white;}
.setting {color: white;position:relative;}
Expand Down
2 changes: 1 addition & 1 deletion scripts/web/CSS/TitlebarCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports.load = (window) => {
ytmusic-section-list-renderer.style-scope.ytmusic-browse-response { margin-top: 32px; }
div#sections { margin-top: 32px; }
ytmusic-tabs#tabs { margin-top: 32px; }
.content.style-scope.ytmusic-tabbed-search-results-renderer { margin-top: 32px; }
.content.style-scope.ytmusic-tabbed-search-results-renderer { margin-top: 32px !important; }
div#back-button img { width: 16px; }
ytmusic-header-renderer.style-scope.ytmusic-browse-response {margin-top: 32px;}
ytd-multi-page-menu-renderer div#container > div#sections {margin-top: 0px !important;}
Expand Down
1 change: 1 addition & 0 deletions scripts/web/CSS/WhiteColorCSS.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports.info = {
name: "WhiteColorCSS"
}

module.exports.load = (window) => {
window.webContents.insertCSS(`
#primaryProgress.tp-yt-paper-progress { background: white !important }
Expand Down
Loading

0 comments on commit 9381b60

Please sign in to comment.