mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Changed devtools keybind from 'wcdev' in sequence to 'ctrl + shift + i'.
This commit is contained in:
parent
45998a2239
commit
6d6d876aa5
@ -63,36 +63,13 @@ $(document).on('click', 'a[href^="http"]', function(event) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens DevTools window if you type "wcdev" in sequence.
|
* Opens DevTools window if you hold (ctrl + shift + i).
|
||||||
* This will crash the program if you are using multiple
|
* This will crash the program if you are using multiple
|
||||||
* DevTools, for example the chrome debugger in VS Code.
|
* DevTools, for example the chrome debugger in VS Code.
|
||||||
*/
|
*/
|
||||||
const match = [87, 67, 68, 69, 86]
|
|
||||||
let at = 0;
|
|
||||||
|
|
||||||
document.addEventListener('keydown', function (e) {
|
document.addEventListener('keydown', function (e) {
|
||||||
switch(e.keyCode){
|
if(e.keyCode == 73 && e.ctrlKey && e.shiftKey){
|
||||||
case match[0]:
|
let window = remote.getCurrentWindow()
|
||||||
if(at === 0) ++at
|
|
||||||
break
|
|
||||||
case match[1]:
|
|
||||||
if(at === 1) ++at
|
|
||||||
break
|
|
||||||
case match[2]:
|
|
||||||
if(at === 2) ++at
|
|
||||||
break
|
|
||||||
case match[3]:
|
|
||||||
if(at === 3) ++at
|
|
||||||
break
|
|
||||||
case match[4]:
|
|
||||||
if(at === 4) ++at
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
at = 0
|
|
||||||
}
|
|
||||||
if(at === 5) {
|
|
||||||
var window = remote.getCurrentWindow()
|
|
||||||
window.toggleDevTools()
|
window.toggleDevTools()
|
||||||
at = 0
|
|
||||||
}
|
}
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user