mirror of https://github.com/gorhill/uBlock.git
fix "Element picker/zapper does not switch tabs" in https://github.com/uBlockOrigin/uBlock-issues/issues/168
This commit is contained in:
parent
e262bb548c
commit
5bd18f1edc
|
@ -400,10 +400,20 @@ var matchBucket = function(url, hostname, bucket, start) {
|
|||
|
||||
this.epickerTarget = targetElement || '';
|
||||
this.epickerZap = zap || false;
|
||||
vAPI.tabs.injectScript(tabId, {
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/168
|
||||
// Force activate the target tab once the element picker has been
|
||||
// injected.
|
||||
vAPI.tabs.injectScript(
|
||||
tabId,
|
||||
{
|
||||
file: '/js/scriptlets/element-picker.js',
|
||||
runAt: 'document_end'
|
||||
});
|
||||
},
|
||||
( ) => {
|
||||
vAPI.tabs.select(tabId);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue