diff --git a/package.json b/package.json index a223d1b..5cf61cd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Raindrop.io", "productName": "Raindrop.io", - "version": "5.1.46", + "version": "5.1.5", "description": "Crossplatform bookmarking app", "main": "src/index.js", "repository": { diff --git a/src/index.js b/src/index.js index d796818..032006a 100644 --- a/src/index.js +++ b/src/index.js @@ -20,4 +20,15 @@ app.on('before-quit', function(){ app.on('window-all-closed', function () { app.quit() +}) + +app.on('web-contents-created', (event, contents) => { + contents.on('will-attach-webview', (event, webPreferences, params) => { + // Strip away preload scripts if unused or verify their location is legitimate + delete webPreferences.preload + delete webPreferences.preloadURL + + // Disable Node.js integration + webPreferences.nodeIntegration = false + }) }) \ No newline at end of file diff --git a/src/window.js b/src/window.js index e7065bc..8471949 100644 --- a/src/window.js +++ b/src/window.js @@ -35,6 +35,7 @@ module.exports = { backgroundColor: '#f6f6f6', webPreferences: { + webviewTag: true, nodeIntegration: true, webSecurity: true, scrollBounce: true, @@ -48,6 +49,9 @@ module.exports = { else*/ this.window.loadURL('https://app.raindrop.io/legacy/4'); + if (isDev) + this.window.webContents.openDevTools(); + this.window.webContents.on('will-navigate', this.handleURLChange); this.window.webContents.on('new-window', function(e,url){ e.preventDefault();