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