mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-04 18:19:38 +02:00
Ignore unused tabs.onUpdated() events
This commit is contained in:
parent
9f693c75c7
commit
e4d75fa025
@ -524,9 +524,12 @@ vAPI.Tabs = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onUpdatedHandler(tabId, changeInfo, tab) {
|
onUpdatedHandler(tabId, changeInfo, tab) {
|
||||||
|
// Ignore uninteresting update events
|
||||||
|
const { status = '', title = '', url = '' } = changeInfo;
|
||||||
|
if ( status === '' && title === '' && url === '' ) { return; }
|
||||||
// https://github.com/gorhill/uBlock/issues/3073
|
// https://github.com/gorhill/uBlock/issues/3073
|
||||||
// Fall back to `tab.url` when `changeInfo.url` is not set.
|
// Fall back to `tab.url` when `changeInfo.url` is not set.
|
||||||
if ( typeof changeInfo.url !== 'string' ) {
|
if ( url === '' ) {
|
||||||
changeInfo.url = tab && tab.url;
|
changeInfo.url = tab && tab.url;
|
||||||
}
|
}
|
||||||
if ( changeInfo.url ) {
|
if ( changeInfo.url ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user