diff --git a/package.json b/package.json index 8bcfbf2..eb08430 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Raindrop.io", "productName": "Raindrop.io", - "version": "5.2.47", + "version": "5.2.48", "description": "Crossplatform bookmarking app", "main": "src/index.js", "repository": { @@ -39,7 +39,7 @@ "@electron-forge/maker-squirrel": "6.0.0-beta.52", "@electron-forge/maker-zip": "6.0.0-beta.52", "@electron-forge/publisher-github": "6.0.0-beta.52", - "electron": "11.1.x", + "electron": "10.2.x", "shx": "^0.3.2" } } diff --git a/src/contextMenu.js b/src/contextMenu.js index 80203f3..82a5b46 100644 --- a/src/contextMenu.js +++ b/src/contextMenu.js @@ -3,10 +3,9 @@ const isDev = require('electron-is-dev') const contextMenu = require('electron-context-menu') module.exports = function() { - app.on('web-contents-created', (e, win) => { + app.on('web-contents-created', (e, window) => { contextMenu({ - //instead of just window: win there is fix for electron 11 - window: win.getType && win.getType() == 'webview' ? win : win.webContents || (win.getWebContentsId && remote.webContents.fromId(win.getWebContentsId())), + window, showCopyImageAddress: true, showSaveImageAs: true, showServices: true, diff --git a/src/window.js b/src/window.js index dd38d76..a0ce338 100644 --- a/src/window.js +++ b/src/window.js @@ -39,6 +39,7 @@ class Window { //security plugins: true, + contextIsolation: true, webPreferences: { nodeIntegration: false, webviewTag: true, diff --git a/yarn.lock b/yarn.lock index f7d421c..89dbe9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1296,10 +1296,10 @@ electron-winstaller@^4.0.0: lodash.template "^4.2.2" temp "^0.9.0" -electron@11.1.x: - version "11.1.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-11.1.0.tgz#8dfdf579d1eb79feef3e3d2937fc022e72129c90" - integrity sha512-RFAhR/852VMaRd9NSe7jprwSoG9dLc6u1GwnqRWg+/3cy/8Zrwt1Betw1lXiZH7hGuB9K2cqju83Xv5Pq5ZSGA== +electron@10.2.x: + version "10.2.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-10.2.0.tgz#4b00f0907b28aca4b93661bb53ce9a4f8ad32201" + integrity sha512-GBUyq8dwUqXPkCTkoID+eZ5Pm9GFlLUd2eSoGe8UOaHeW68SgCf5t75/uGHraQ1OIz/0qniyH5M4ebWEHGppyQ== dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12"