mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Use ctrl-spacebar instead of spacebar to toggle god mode
Related feedback: - https://github.com/gorhill/uBlock/commit/aec2f81884c5#commitcomment-39385794
This commit is contained in:
parent
aec2f81884
commit
a018937792
@ -1112,13 +1112,19 @@ const toggleHostnameSwitch = async function(ev) {
|
|||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Space bar: toggle god mode
|
Ctrl-Space bar: toggle god mode
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const keyboardHandler = function(ev) {
|
const keyboardHandler = function(ev) {
|
||||||
if ( ev.keyCode === 0x20 ) {
|
let consumed = false;
|
||||||
|
if ( ev.ctrlKey && ev.key === ' ' ) {
|
||||||
document.body.classList.toggle('godMode');
|
document.body.classList.toggle('godMode');
|
||||||
|
consumed = true;
|
||||||
|
}
|
||||||
|
if ( consumed ) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user