From f4f029a8128b7a7bd16ed3e4df7af45ab24cb033 Mon Sep 17 00:00:00 2001 From: Pierre Slamich Date: Thu, 4 Jan 2024 13:39:10 +0100 Subject: [PATCH] feat: add shortcut to crop from question game --- src/off.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/off.ts b/src/off.ts index 252f57cfc5..e44a3c4343 100644 --- a/src/off.ts +++ b/src/off.ts @@ -82,7 +82,11 @@ const offService = { lang === "en" ? "" : "-" + lang }.openfoodfacts.org/cgi/product.pl?type=edit&code=${barcode}`; }, - + // TODO: Create a UI button allowing to jump to the Crop page by barcode from the question game + getLogoCropsByBarcodeUrl(barcode) { + return `https://hunger.openfoodfacts.org/logos/search?barcode==${barcode}`; + }, + getImageUrl(imagePath) { return combineURLs(OFF_IMAGE_URL, imagePath); }, @@ -155,7 +159,7 @@ const offService = { )}?${urlParams.toString()}`, ); }, - + // TODO: fix method name setIngedrient({ code, lang, text }) { if (!code) { console.error("setIngedrient: Missing code");