also listen for tab title change
This commit is contained in:
parent
c6f228bf14
commit
f16ff53cf4
@ -444,12 +444,15 @@ function registerTalerHeaderListener(
|
|||||||
info: chrome.tabs.TabChangeInfo,
|
info: chrome.tabs.TabChangeInfo,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (tabId < 0) return;
|
if (tabId < 0) return;
|
||||||
if (info.status !== "complete") return;
|
const tabLocationHasBeenUpdated = info.status === "complete"
|
||||||
|
const tabTitleHasBeenUpdated = info.title !== undefined
|
||||||
|
if (tabLocationHasBeenUpdated || tabTitleHasBeenUpdated) {
|
||||||
const uri = await findTalerUriInTab(tabId);
|
const uri = await findTalerUriInTab(tabId);
|
||||||
if (!uri) return;
|
if (!uri) return;
|
||||||
logger.info(`Found a Taler URI in the tab ${tabId}`);
|
logger.info(`Found a Taler URI in the tab ${tabId}`);
|
||||||
callback(tabId, uri);
|
callback(tabId, uri);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const prevHeaderListener = currentHeaderListener;
|
const prevHeaderListener = currentHeaderListener;
|
||||||
const prevTabListener = currentTabListener;
|
const prevTabListener = currentTabListener;
|
||||||
|
Loading…
Reference in New Issue
Block a user