move window._bot = true to preload.js

This commit is contained in:
jjavierdguezas 2022-07-01 11:54:35 +02:00
parent c8ccd0f410
commit 6e1e724682
2 changed files with 2 additions and 7 deletions

View file

@ -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()) {

View file

@ -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;