去除 showDevTools

This commit is contained in:
fofolee 2022-04-26 22:00:39 +08:00
parent ae4461cfe7
commit 916db57235
4 changed files with 1 additions and 32 deletions

View File

@ -1,13 +0,0 @@
window._ = require("lodash")
window.utools = require("./utoolsLite")()
window.exit = () => {
process.exit()
}
// 绕过限制
setTimeout(() => {
Object.assign(window, {
process,
Buffer,
require
})
}, 100);

View File

@ -176,24 +176,6 @@ window.quickcommand = {
process.execPath
child_process.exec(uToolsPath, () => {})
},
// 显示一个全功能的 devTools
showDevTools: function() {
if (!browserWindow || browserWindow.webContents.isDestroyed()) {
browserWindow = createBrowserWindow('lib/sandbox.html', {
show: false,
title: '快捷命令',
webPreferences: {
preload: 'lib/sandbox.js',
},
}, () => {})
}
browserWindow.webContents.openDevTools({
mode: 'detach'
})
// browserWindow.webContents.executeJavaScript(``)
return browserWindow
}
}
// 运行vbs脚本