diff --git a/desktop-app/app/components/WebView/index.js b/desktop-app/app/components/WebView/index.js index 3277596b..bf326f5f 100644 --- a/desktop-app/app/components/WebView/index.js +++ b/desktop-app/app/components/WebView/index.js @@ -185,13 +185,6 @@ class WebView extends Component { ); this.webviewRef.current.addEventListener('dom-ready', () => { - this.getWebContentForId(this.webviewRef.current.getWebContentsId()) - .executeJavaScript( - `{ - window._bot = true; - }` - ) - .catch(captureOnSentry); this.initEventTriggers(this.webviewRef.current); this.dbg = this.getWebContents().debugger; if (!this.dbg.isAttached()) { diff --git a/desktop-app/app/preload.js b/desktop-app/app/preload.js index 627a34c1..2c800f70 100644 --- a/desktop-app/app/preload.js +++ b/desktop-app/app/preload.js @@ -3,6 +3,8 @@ const {ipcRenderer, remote} = require('electron'); const {Menu} = remote; const {MenuItem} = remote; +window._bot = true; + const menu = new Menu(); let rightClickPosition = null;