1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00

very slightly more reliable page title lookup

This commit is contained in:
gorhill 2015-05-26 17:16:16 -04:00
parent 2c3d810840
commit 812d34bfe8

View File

@ -619,9 +619,14 @@ vAPI.tabs.registerListeners();
if ( !tab.title && tryAgain(tabId) ) {
return;
}
tryNoMore(tabId);
// https://github.com/gorhill/uMatrix/issues/225
// Sometimes title changes while page is loading.
var settled = tab.title && tab.title === pageStore.title;
pageStore.title = tab.title || tab.url || '';
this.pageStoresToken = Date.now();
if ( settled || !tryAgain(tabId) ) {
tryNoMore(tabId);
}
};
var updateTitle = function(tabId) {