mirror of
https://github.com/responsively-org/responsively-app
synced 2024-09-20 22:31:59 +00:00
move window._bot = true
to preload.js
This commit is contained in:
parent
c8ccd0f410
commit
6e1e724682
2 changed files with 2 additions and 7 deletions
|
@ -185,13 +185,6 @@ class WebView extends Component {
|
||||||
);
|
);
|
||||||
|
|
||||||
this.webviewRef.current.addEventListener('dom-ready', () => {
|
this.webviewRef.current.addEventListener('dom-ready', () => {
|
||||||
this.getWebContentForId(this.webviewRef.current.getWebContentsId())
|
|
||||||
.executeJavaScript(
|
|
||||||
`{
|
|
||||||
window._bot = true;
|
|
||||||
}`
|
|
||||||
)
|
|
||||||
.catch(captureOnSentry);
|
|
||||||
this.initEventTriggers(this.webviewRef.current);
|
this.initEventTriggers(this.webviewRef.current);
|
||||||
this.dbg = this.getWebContents().debugger;
|
this.dbg = this.getWebContents().debugger;
|
||||||
if (!this.dbg.isAttached()) {
|
if (!this.dbg.isAttached()) {
|
||||||
|
|
|
@ -3,6 +3,8 @@ const {ipcRenderer, remote} = require('electron');
|
||||||
const {Menu} = remote;
|
const {Menu} = remote;
|
||||||
const {MenuItem} = remote;
|
const {MenuItem} = remote;
|
||||||
|
|
||||||
|
window._bot = true;
|
||||||
|
|
||||||
const menu = new Menu();
|
const menu = new Menu();
|
||||||
let rightClickPosition = null;
|
let rightClickPosition = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue