1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-18 08:52:26 +02:00

code review: fix case of picker trying to pick itself

This commit is contained in:
gorhill 2014-10-13 09:38:36 -04:00
parent 65a9e38f91
commit 8ddf1f4b47

View File

@ -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