Merge pull request #49 from wagesj45/codex/fix-cache-clearing-and-reasoning-view-button-registration-bu

Fix message display script paths
This commit is contained in:
Jordan Wages 2025-06-27 03:13:49 -05:00 committed by GitHub
commit 2e8a505166
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -233,11 +233,11 @@ async function clearCacheForMessages(idsInput) {
const scripts = [ const scripts = [
{ {
id: "clear-cache-button", id: "clear-cache-button",
js: [browser.runtime.getURL("resources/clearCacheButton.js")], js: ["resources/clearCacheButton.js"],
}, },
{ {
id: "reason-button", id: "reason-button",
js: [browser.runtime.getURL("resources/reasonButton.js")], js: ["resources/reasonButton.js"],
}, },
]; ];
await browser.scripting.messageDisplay.registerScripts(scripts); await browser.scripting.messageDisplay.registerScripts(scripts);
@ -247,8 +247,8 @@ async function clearCacheForMessages(idsInput) {
} else if (browser.messageDisplayScripts) { } else if (browser.messageDisplayScripts) {
try { try {
const scripts = [ const scripts = [
{ js: [browser.runtime.getURL("resources/clearCacheButton.js")] }, { js: ["resources/clearCacheButton.js"] },
{ js: [browser.runtime.getURL("resources/reasonButton.js")] }, { js: ["resources/reasonButton.js"] },
]; ];
if (browser.messageDisplayScripts.registerScripts) { if (browser.messageDisplayScripts.registerScripts) {
await browser.messageDisplayScripts.registerScripts(scripts); await browser.messageDisplayScripts.registerScripts(scripts);