Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/argo-archive-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ export class ArgoArchiveList extends LitElement {
if (msg.type === "pages") this.pages = msg.pages || [];
});
port.postMessage({ type: "getPages" });

// @ts-expect-error - TS7006 - Parameter 'msg' implicitly has an 'any' type.
chrome.runtime.onMessage.addListener((msg) => {
if (msg.type === "pageAdded") {
// ask the background for a fresh list
port.postMessage({ type: "getPages" });
}
});
}

render() {
Expand Down
17 changes: 7 additions & 10 deletions src/ext/browser-recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ class BrowserRecorder extends Recorder {
}

if (numOtherRecorders > 0) {
console.log(
`closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`,
);
console.log(`closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`);
return this.sessionClose([]);
} else {
console.log("detaching debugger, already tabs stopped");
Expand Down Expand Up @@ -236,9 +234,7 @@ class BrowserRecorder extends Recorder {
this.doUpdateStatus();
} catch (msg) {
// @ts-expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'.
this.failureMsg = chrome.runtime.lastError
? chrome.runtime.lastError.message
: msg;
this.failureMsg = chrome.runtime.lastError ? chrome.runtime.lastError.message : msg;
this.doUpdateStatus();
throw msg;
}
Expand Down Expand Up @@ -343,7 +339,10 @@ class BrowserRecorder extends Recorder {
// @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'.
if (this.db) {
// @ts-expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'.
return this.db.addPage(pageInfo);
const result = this.db.addPage(pageInfo);

chrome.runtime.sendMessage({ type: "pageAdded" });
return result;
}
}

Expand Down Expand Up @@ -372,9 +371,7 @@ class BrowserRecorder extends Recorder {
prr.resolve(res);
} else {
// @ts-expect-error - TS7005 - Variable 'prr' implicitly has an 'any' type.
prr.reject(
chrome.runtime.lastError ? chrome.runtime.lastError.message : "",
);
prr.reject(chrome.runtime.lastError ? chrome.runtime.lastError.message : "");
}
};

Expand Down
Loading