also listen for tab title change
This commit is contained in:
parent
c6f228bf14
commit
f16ff53cf4
@ -444,11 +444,14 @@ 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 uri = await findTalerUriInTab(tabId);
|
const tabTitleHasBeenUpdated = info.title !== undefined
|
||||||
if (!uri) return;
|
if (tabLocationHasBeenUpdated || tabTitleHasBeenUpdated) {
|
||||||
logger.info(`Found a Taler URI in the tab ${tabId}`);
|
const uri = await findTalerUriInTab(tabId);
|
||||||
callback(tabId, uri);
|
if (!uri) return;
|
||||||
|
logger.info(`Found a Taler URI in the tab ${tabId}`);
|
||||||
|
callback(tabId, uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const prevHeaderListener = currentHeaderListener;
|
const prevHeaderListener = currentHeaderListener;
|
||||||
@ -540,26 +543,26 @@ function setAlertedIcon(): void {
|
|||||||
|
|
||||||
interface OffscreenCanvasRenderingContext2D
|
interface OffscreenCanvasRenderingContext2D
|
||||||
extends CanvasState,
|
extends CanvasState,
|
||||||
CanvasTransform,
|
CanvasTransform,
|
||||||
CanvasCompositing,
|
CanvasCompositing,
|
||||||
CanvasImageSmoothing,
|
CanvasImageSmoothing,
|
||||||
CanvasFillStrokeStyles,
|
CanvasFillStrokeStyles,
|
||||||
CanvasShadowStyles,
|
CanvasShadowStyles,
|
||||||
CanvasFilters,
|
CanvasFilters,
|
||||||
CanvasRect,
|
CanvasRect,
|
||||||
CanvasDrawPath,
|
CanvasDrawPath,
|
||||||
CanvasUserInterface,
|
CanvasUserInterface,
|
||||||
CanvasText,
|
CanvasText,
|
||||||
CanvasDrawImage,
|
CanvasDrawImage,
|
||||||
CanvasImageData,
|
CanvasImageData,
|
||||||
CanvasPathDrawingStyles,
|
CanvasPathDrawingStyles,
|
||||||
CanvasTextDrawingStyles,
|
CanvasTextDrawingStyles,
|
||||||
CanvasPath {
|
CanvasPath {
|
||||||
readonly canvas: OffscreenCanvas;
|
readonly canvas: OffscreenCanvas;
|
||||||
}
|
}
|
||||||
declare const OffscreenCanvasRenderingContext2D: {
|
declare const OffscreenCanvasRenderingContext2D: {
|
||||||
prototype: OffscreenCanvasRenderingContext2D;
|
prototype: OffscreenCanvasRenderingContext2D;
|
||||||
new (): OffscreenCanvasRenderingContext2D;
|
new(): OffscreenCanvasRenderingContext2D;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface OffscreenCanvas extends EventTarget {
|
interface OffscreenCanvas extends EventTarget {
|
||||||
@ -572,7 +575,7 @@ interface OffscreenCanvas extends EventTarget {
|
|||||||
}
|
}
|
||||||
declare const OffscreenCanvas: {
|
declare const OffscreenCanvas: {
|
||||||
prototype: OffscreenCanvas;
|
prototype: OffscreenCanvas;
|
||||||
new (width: number, height: number): OffscreenCanvas;
|
new(width: number, height: number): OffscreenCanvas;
|
||||||
};
|
};
|
||||||
|
|
||||||
function createCanvas(size: number): OffscreenCanvas {
|
function createCanvas(size: number): OffscreenCanvas {
|
||||||
|
Loading…
Reference in New Issue
Block a user