Skip to content

Commit

Permalink
added sign in option
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaciousCoder78 committed Dec 10, 2023
1 parent 0df7da3 commit 060b7d1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "youtube-music-desktop",
"productName": "Youtube Music Desktop",
"version": "1.0.0",
"version": "1.0.1",
"description": "My Electron application description",
"main": ".vite/build/main.js",
"scripts": {
"start": "electron main.js",
"package": "electron-builder build",
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
Expand Down
21 changes: 20 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,26 @@ const createWindow = () => {
preload: path.join(__dirname, 'preload.js'),
},
});
mainWindow.setMenuBarVisibility(false) // and load the index.html of the app.
mainWindow.setMenuBarVisibility(false)
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url === 'about:blank') {
return {
action: 'allow',
overrideBrowserWindowOptions: {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
webPreferences: {
preload: 'my-child-window-preload-script.js'
}
}
}
}
return { action: 'deny' }
})


// and load the index.html of the app.
try{
mainWindow.loadURL("https://music.youtube.com")
}
Expand Down

0 comments on commit 060b7d1

Please sign in to comment.