From 812d34bfe804c862d7f9e9a9d74ab50df1774266 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 26 May 2015 17:16:16 -0400 Subject: [PATCH] very slightly more reliable page title lookup --- src/js/tab.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/tab.js b/src/js/tab.js index 05e705209..8c3efac95 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -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) {