1 Commits
1.0 ... signed

Author SHA1 Message Date
d468703f16 Filter popup 2026-08-05 23:12:56 -05:00

View File

@@ -128,32 +128,21 @@ function buildRow(entry) {
}
async function loadCapturedUrls() {
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
const activeTab = tabs[0];
if (!activeTab || typeof activeTab.id !== "number") {
setStatus("No active tab found.");
return;
}
const response = await browser.runtime.sendMessage({
type: "GET_TAB_URLS",
tabId: activeTab.id
});
const response = await browser.runtime.sendMessage({ type: "GET_HISTORY" });
if (!response || !response.ok) {
setStatus("Unable to load captured URLs.");
setStatus("Unable to load captured samples.");
return;
}
listEl.innerHTML = "";
const entries = Array.isArray(response.entries) ? response.entries : [];
const entries = Array.isArray(response.history) ? response.history : [];
if (!entries.length) {
setStatus("No captured samples for this tab yet.");
setStatus("No captured samples yet.");
return;
}
setStatus(`Captured samples for this tab: ${entries.length}`);
setStatus(`Captured samples: ${entries.length}`);
for (const entry of entries) {
listEl.appendChild(buildRow(entry));
}