mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 10:17:34 +01:00
code review: fix case of picker trying to pick itself
This commit is contained in:
parent
65a9e38f91
commit
8ddf1f4b47
1 changed files with 68 additions and 66 deletions
|
@ -987,15 +987,8 @@ var startPicker = function() {
|
|||
document.addEventListener('keydown', onKeyPressed);
|
||||
|
||||
highlightElements([], true);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
startPicker();
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
messaging.ask({ what: 'elementPickerArguments' }, function(details) {
|
||||
var initPicker = function(details) {
|
||||
var i18nMap = {
|
||||
'#create': 'create',
|
||||
'#pick': 'pick',
|
||||
|
@ -1059,7 +1052,16 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
|
|||
showDialog({ modifier: true });
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
messaging.ask({ what: 'elementPickerArguments' }, initPicker);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
startPicker();
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// https://www.youtube.com/watch?v=sociXdKnyr8
|
||||
|
||||
|
|
Loading…
Reference in a new issue