mirror of https://github.com/gorhill/uBlock.git
refining
This commit is contained in:
parent
f0c2285dae
commit
e318f5056c
|
@ -954,6 +954,8 @@ var startPicker = function() {
|
|||
urlNormalizer = document.createElement('a');
|
||||
window.addEventListener('scroll', onScrolled);
|
||||
document.addEventListener('keydown', onKeyPressed);
|
||||
|
||||
highlightElements([], true);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -985,9 +987,11 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
|
|||
// Try using mouse position
|
||||
if ( details.clientX !== -1 ) {
|
||||
elem = elementFromPoint(details.clientX, details.clientY);
|
||||
filtersFromElement(elem);
|
||||
showDialog();
|
||||
return;
|
||||
if ( elem !== null ) {
|
||||
filtersFromElement(elem);
|
||||
showDialog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// No mouse position available, use suggested target
|
||||
|
@ -1027,6 +1031,8 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
|
|||
}
|
||||
});
|
||||
|
||||
// https://www.youtube.com/watch?v=sociXdKnyr8
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue