mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
allow default startingPage
This commit is contained in:
@ -16,7 +16,7 @@ const defaultConfig = {
|
|||||||
autoResetAppCache: false,
|
autoResetAppCache: false,
|
||||||
resumeOnStart: true,
|
resumeOnStart: true,
|
||||||
proxy: "",
|
proxy: "",
|
||||||
startingPage: "Home",
|
startingPage: "",
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
// Enabled plugins
|
// Enabled plugins
|
||||||
|
|||||||
@ -10,9 +10,6 @@ const setDefaultPluginOptions = (store, plugin) => {
|
|||||||
|
|
||||||
const migrations = {
|
const migrations = {
|
||||||
">=1.20.0": (store) => {
|
">=1.20.0": (store) => {
|
||||||
// used only to make the radio button checked in the menu
|
|
||||||
store.set('options.startingPage', "Home");
|
|
||||||
|
|
||||||
setDefaultPluginOptions(store, "visualizer");
|
setDefaultPluginOptions(store, "visualizer");
|
||||||
|
|
||||||
if (store.get("plugins.notifications.toastStyle") === undefined) {
|
if (store.get("plugins.notifications.toastStyle") === undefined) {
|
||||||
|
|||||||
@ -133,7 +133,7 @@ function onApiLoaded() {
|
|||||||
|
|
||||||
// Navigate to "Starting page"
|
// Navigate to "Starting page"
|
||||||
const startingPage = config.get("options.startingPage");
|
const startingPage = config.get("options.startingPage");
|
||||||
if (startingPage !== "home" && startingPages[startingPage]) {
|
if (startingPage && startingPages[startingPage]) {
|
||||||
$('ytmusic-app')?.navigate_(startingPages[startingPage]);
|
$('ytmusic-app')?.navigate_(startingPages[startingPage]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
const startingPages = {
|
const startingPages = {
|
||||||
|
Default: '',
|
||||||
Home: 'FEmusic_home',
|
Home: 'FEmusic_home',
|
||||||
Explore: 'FEmusic_explore',
|
Explore: 'FEmusic_explore',
|
||||||
'New Releases': 'FEmusic_new_releases',
|
'New Releases': 'FEmusic_new_releases',
|
||||||
|
|||||||
Reference in New Issue
Block a user