From 137d30c06c7988277ab6f1a633a93374221f29ef Mon Sep 17 00:00:00 2001 From: FMaz Date: Wed, 16 Oct 2024 08:50:04 -0300 Subject: [PATCH] Explicitely make the is_parent_asin value a string for the URLs --- page/notifications.js | 2 +- scripts/bootloader.js | 2 +- scripts/vh_service_worker.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/page/notifications.js b/page/notifications.js index 3be12c7..a8e777b 100644 --- a/page/notifications.js +++ b/page/notifications.js @@ -319,7 +319,7 @@ function addItem(data) { if (Settings.get("general.searchOpenModal") && is_parent_asin != null && enrollment_guid != null) { Tpl.setVar( "url", - `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin};${enrollment_guid}` + `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin ? "true" : "false"};${enrollment_guid}` ); } else { Tpl.setVar("url", `https://www.amazon.${vineDomain}/vine/vine-items?search=${search}`); diff --git a/scripts/bootloader.js b/scripts/bootloader.js index d343f43..2568343 100644 --- a/scripts/bootloader.js +++ b/scripts/bootloader.js @@ -1029,7 +1029,7 @@ browser.runtime.onMessage.addListener(async function (message, sender, sendRespo if (Settings.get("general.searchOpenModal") && is_parent_asin != null && enrollment_guid != null) { Tpl.setVar( "url", - `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin};${enrollment_guid}` + `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin ? "true" : "false"};${enrollment_guid}` ); } else { Tpl.setVar("url", `https://www.amazon.${vineDomain}/vine/vine-items?search=${search}`); diff --git a/scripts/vh_service_worker.js b/scripts/vh_service_worker.js index ff8c567..4aa6ae1 100644 --- a/scripts/vh_service_worker.js +++ b/scripts/vh_service_worker.js @@ -145,7 +145,7 @@ chrome.notifications.onClicked.addListener((notificationId) => { const { asin, queue, is_parent_asin, enrollment_guid, search } = notificationsData[notificationId]; if (Settings.get("general.searchOpenModal") && is_parent_asin != null && enrollment_guid != null) { chrome.tabs.create({ - url: `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin};${enrollment_guid}`, + url: `https://www.amazon.${vineDomain}/vine/vine-items?queue=encore#openModal;${asin};${queue};${is_parent_asin ? "true" : "false"};${enrollment_guid}`, }); } else { chrome.tabs.create({