Canonical product URL — same URL the supplier fetches.
Supplier name, e.g. "Loudwolf".
true if an entry exists for this (url, supplier) pair.
if (await shouldExcludeProduct("https://example.com/acetone", "Loudwolf")) {
return undefined; // skip this result
}
// => true (user previously right-click → Ignore)
// => false (not ignored, or read failed)
export async function shouldExcludeProduct(url: string, supplierName: string): Promise<boolean> {
try {
const map = await loadExcludedProducts();
const key = getProductExclusionKey(url, supplierName);
return map[key] !== undefined;
} catch (error) {
console.warn("Failed to check if product should be excluded", { error });
return false;
}
}
Check whether a given product (identified by URL + supplier name) is on the user's ignore list. Called from the supplier hot-path to drop results the user previously excluded. Returns
falseon any read error so a storage blip can't accidentally hide everything.