Skip to content

Commit

Permalink
Fix Preview tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Oct 2, 2019
1 parent 7d5e7a3 commit 5fbf1c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
11 changes: 11 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
})
4 changes: 4 additions & 0 deletions src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
backgroundColor: '#f6f6f6',

webPreferences: {
webviewTag: true,
nodeIntegration: true,
webSecurity: true,
scrollBounce: true,
Expand All @@ -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();
Expand Down

0 comments on commit 5fbf1c0

Please sign in to comment.