mirror of https://github.com/gorhill/uBlock.git
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