提交 9033d8fd 编写于 作者: B baiy 提交者: ninecents

update

上级 d25ae5f6
...@@ -10,15 +10,15 @@ browserWindow.webContents.on('before-input-event', (event, input) => { ...@@ -10,15 +10,15 @@ browserWindow.webContents.on('before-input-event', (event, input) => {
} }
} }
}) })
browserWindow.once('ready-to-show', () => {
browserWindow.show()
})
window.ctool = {} window.ctool = {}
window.ctool.isDevToolsOpened = function () { window.ctool.isDevToolsOpened = function () {
return browserWindow.webContents.isDevToolsOpened(); return browserWindow.webContents.isDevToolsOpened();
} }
window.ctool.toggleDevTools = function () { window.ctool.toggleDevTools = function () {
if (window.ctool.isDevToolsOpened) { return browserWindow.webContents.toggleDevTools();
return browserWindow.webContents.closeDevTools();
}
return browserWindow.webContents.openDevTools();
} }
window.ctool.browserWindow = browserWindow;
\ No newline at end of file
...@@ -24,17 +24,15 @@ ...@@ -24,17 +24,15 @@
if (code.indexOf('ctool-') !== -1) { if (code.indexOf('ctool-') !== -1) {
tool = code.replace(/ctool-/g, "") tool = code.replace(/ctool-/g, "")
} }
setToolCode(tool) setToolCode(tool)
window.utools.createBrowserWindow( window.utools.createBrowserWindow(
'tool.html', 'tool.html',
{ {
width: 1200, width: 1200,
minWidth: 900,
minHeight: 650,
height: 650, height: 650,
show: false,
webPreferences: { webPreferences: {
preload: 'utools_preload.js' preload: 'tool_preload.js'
} }
} }
) )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册