From a7009d644c8bd2502a400e6f0b01a95f592b6090 Mon Sep 17 00:00:00 2001 From: Jordan Wages Date: Fri, 27 Jun 2025 03:12:32 -0500 Subject: [PATCH] Fix script registration with relative URLs --- background.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/background.js b/background.js index ca235c8..1b25492 100644 --- a/background.js +++ b/background.js @@ -233,11 +233,11 @@ async function clearCacheForMessages(idsInput) { const scripts = [ { id: "clear-cache-button", - js: [browser.runtime.getURL("resources/clearCacheButton.js")], + js: ["resources/clearCacheButton.js"], }, { id: "reason-button", - js: [browser.runtime.getURL("resources/reasonButton.js")], + js: ["resources/reasonButton.js"], }, ]; await browser.scripting.messageDisplay.registerScripts(scripts); @@ -247,8 +247,8 @@ async function clearCacheForMessages(idsInput) { } else if (browser.messageDisplayScripts) { try { const scripts = [ - { js: [browser.runtime.getURL("resources/clearCacheButton.js")] }, - { js: [browser.runtime.getURL("resources/reasonButton.js")] }, + { js: ["resources/clearCacheButton.js"] }, + { js: ["resources/reasonButton.js"] }, ]; if (browser.messageDisplayScripts.registerScripts) { await browser.messageDisplayScripts.registerScripts(scripts);