Developers menu button to show dev tools
This commit is contained in:
@@ -65,6 +65,11 @@ function toggleDevTools () {
|
||||
}
|
||||
}
|
||||
|
||||
function showWebTorrentWindow () {
|
||||
windows.webtorrent.show()
|
||||
windows.webtorrent.webContents.openDevTools({detach: true})
|
||||
}
|
||||
|
||||
function reloadWindow () {
|
||||
log('reloadWindow')
|
||||
if (windows.main) {
|
||||
@@ -255,6 +260,10 @@ function getAppMenuTemplate () {
|
||||
: 'Ctrl+Shift+I',
|
||||
click: toggleDevTools
|
||||
},
|
||||
{
|
||||
label: 'Show WebTorrent Process',
|
||||
click: showWebTorrentWindow
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
|
||||
@@ -49,14 +49,17 @@ function createAboutWindow () {
|
||||
|
||||
function createWebTorrentHiddenWindow () {
|
||||
var win = windows.webtorrent = new electron.BrowserWindow({
|
||||
backgroundColor: '#ECECEC',
|
||||
backgroundColor: '#282828',
|
||||
show: false,
|
||||
center: true,
|
||||
title: 'webtorrent-hidden-window',
|
||||
width: 500,
|
||||
height: 500,
|
||||
useContentSize: true,
|
||||
width: 368,
|
||||
height: 388,
|
||||
minimizable: false,
|
||||
maximizable: false,
|
||||
resizable: false,
|
||||
fullscreenable: false,
|
||||
fullscreen: false,
|
||||
skipTaskbar: true
|
||||
})
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<!doctype html>
|
||||
<script async src="webtorrent.js"></script>
|
||||
<h1>WebTorrent Hidden Window</h1>
|
||||
<body style="background-color: #282828; margin: 10px 0; overflow: hidden;">
|
||||
<script async src="webtorrent.js"></script>
|
||||
<img src="../static/WebTorrent.png">
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user