mirror of https://github.com/gorhill/uBlock.git
convenience: shift-click to stay in element-zapper mode
This commit is contained in:
parent
c1589cafaa
commit
189c9d55dd
|
@ -1214,6 +1214,8 @@ var zap = function() {
|
||||||
document.documentElement.style.setProperty('overflow', 'auto', 'important');
|
document.documentElement.style.setProperty('overflow', 'auto', 'important');
|
||||||
}
|
}
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
|
elem = elementFromPoint();
|
||||||
|
highlightElements(elem ? [elem] : []);
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -1281,7 +1283,9 @@ var onSvgClicked = function(ev) {
|
||||||
}
|
}
|
||||||
if ( pickerBody.classList.contains('zap') ) {
|
if ( pickerBody.classList.contains('zap') ) {
|
||||||
zap();
|
zap();
|
||||||
stopPicker();
|
if ( !ev.shiftKey ) {
|
||||||
|
stopPicker();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showDialog();
|
showDialog();
|
||||||
|
@ -1304,8 +1308,6 @@ var onKeyPressed = function(ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
zap();
|
zap();
|
||||||
elem = elementFromPoint();
|
|
||||||
highlightElements(elem ? [elem] : []);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Esc
|
// Esc
|
||||||
|
|
Loading…
Reference in New Issue