diff --git a/src/main/index.js b/src/main/index.js index 9c8f24bf..744324e6 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -15,8 +15,11 @@ app.on('second-instance', (event, argv, cwd) => { } }) +const isDev = process.env.NODE_ENV !== 'production' + app.on('web-contents-created', (event, contents) => { contents.on('will-navigate', (event, navigationUrl) => { + if (isDev) return console.log('navigation to url:', navigationUrl) event.preventDefault() }) contents.on('new-window', async(event, navigationUrl) => { @@ -27,7 +30,6 @@ app.on('web-contents-created', (event, contents) => { }) }) -const isDev = process.env.NODE_ENV !== 'production' // https://github.com/electron/electron/issues/18397 app.allowRendererProcessReuse = !isDev diff --git a/src/renderer/utils/music/mg/lyric.js b/src/renderer/utils/music/mg/lyric.js index 65191f79..330aa10d 100644 --- a/src/renderer/utils/music/mg/lyric.js +++ b/src/renderer/utils/music/mg/lyric.js @@ -2,7 +2,7 @@ import { httpFetch } from '../../request' export default { getLyric(songInfo, tryNum = 0) { - console.log(songInfo.copyrightId) + // console.log(songInfo.copyrightId) if (songInfo.lrcUrl) { let requestObj = httpFetch(songInfo.lrcUrl) requestObj.promise = requestObj.promise.then(({ body, statusCode }) => {