Skip to content

Commit

Permalink
julian-alarcon#189 Force nodeIntegration and contextIsolation to let …
Browse files Browse the repository at this point in the history
…require works again.
  • Loading branch information
MagiusCHE committed Dec 13, 2021
1 parent b5d9422 commit f92b7f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controller/mail-window-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class MailWindowController {
webPreferences: {
spellcheck: true,
nativeWindowOpen: true,
affinity: 'main-window'
affinity: 'main-window',
contextIsolation: false,
nodeIntegration: true,
}
})

Expand Down Expand Up @@ -160,7 +162,7 @@ class MailWindowController {
addUnreadNumberObserver() {
this.win.webContents.executeJavaScript(`
setTimeout(() => {
let unreadSpan = document.querySelector('._2iKri0mE1PM9vmRn--wKyI');
let unreadSpan = document.querySelector('._2iKri0mE1PM9vmRn--wKyI, ._n_J4._n_F4 .ms-fcl-tp');
require('electron').ipcRenderer.send('updateUnread', unreadSpan.hasChildNodes());
let observer = new MutationObserver(mutations => {
Expand Down

0 comments on commit f92b7f4

Please sign in to comment.