mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
stylecheck
This commit is contained in:
30
index.js
30
index.js
@ -38,7 +38,7 @@ if (config.get("options.proxy")) {
|
|||||||
|
|
||||||
// Adds debug features like hotkeys for triggering dev tools and reload
|
// Adds debug features like hotkeys for triggering dev tools and reload
|
||||||
require("electron-debug")({
|
require("electron-debug")({
|
||||||
showDevTools: false //disable dev tools on electron-prompt
|
showDevTools: false //disable automatic devTools on new window
|
||||||
});
|
});
|
||||||
|
|
||||||
// Prevent window being garbage collected
|
// Prevent window being garbage collected
|
||||||
@ -100,18 +100,18 @@ function createMainWindow() {
|
|||||||
affinity: "main-window", // main window, and addition windows should work in one process
|
affinity: "main-window", // main window, and addition windows should work in one process
|
||||||
...(isTesting()
|
...(isTesting()
|
||||||
? {
|
? {
|
||||||
// Only necessary when testing with Spectron
|
// Only necessary when testing with Spectron
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
}
|
}
|
||||||
: undefined),
|
: undefined),
|
||||||
},
|
},
|
||||||
frame: !is.macOS() && !useInlineMenu,
|
frame: !is.macOS() && !useInlineMenu,
|
||||||
titleBarStyle: useInlineMenu
|
titleBarStyle: useInlineMenu
|
||||||
? "hidden"
|
? "hidden"
|
||||||
: is.macOS()
|
: is.macOS()
|
||||||
? "hiddenInset"
|
? "hiddenInset"
|
||||||
: "default",
|
: "default",
|
||||||
autoHideMenuBar: config.get("options.hideMenu"),
|
autoHideMenuBar: config.get("options.hideMenu"),
|
||||||
});
|
});
|
||||||
if (windowPosition) {
|
if (windowPosition) {
|
||||||
@ -157,20 +157,20 @@ function createMainWindow() {
|
|||||||
let createdWindow = false;
|
let createdWindow = false;
|
||||||
app.on("browser-window-created", (event, win) => {
|
app.on("browser-window-created", (event, win) => {
|
||||||
//Ensure listeners aren't registered when creating input dialog
|
//Ensure listeners aren't registered when creating input dialog
|
||||||
if(createdWindow){
|
if (createdWindow) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
createdWindow = true;
|
createdWindow = true;
|
||||||
loadPlugins(win);
|
loadPlugins(win);
|
||||||
|
|
||||||
win.webContents.on("did-fail-load", (
|
win.webContents.on("did-fail-load", (
|
||||||
event,
|
event,
|
||||||
errorCode,
|
errorCode,
|
||||||
errorDescription,
|
errorDescription,
|
||||||
validatedURL,
|
validatedURL,
|
||||||
isMainFrame,
|
isMainFrame,
|
||||||
frameProcessId,
|
frameProcessId,
|
||||||
frameRoutingId,
|
frameRoutingId,
|
||||||
) => {
|
) => {
|
||||||
let log = {
|
let log = {
|
||||||
error: "did-fail-load",
|
error: "did-fail-load",
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const { ipcRenderer } = require("electron");
|
|||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
ipcRenderer.on("log", (event, log) => {
|
ipcRenderer.on("log", (event, log) => {
|
||||||
let string = log.toString() || log;
|
let string = log.toString() || log;
|
||||||
if (string) {
|
if (string) {
|
||||||
console.log(string);
|
console.log(string);
|
||||||
} else {
|
} else {
|
||||||
for (let propery of log) {
|
for (let propery of log) {
|
||||||
console.log(propery.toString() || propery);
|
console.log(propery.toString() || propery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user