From 5d42e03b905a2850f9a93d7fa98ba70c214344a1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Feb 2026 03:08:20 +0000 Subject: [PATCH] fix(browser): address code review feedback - Add explicit return value to message listener in content.js - Fix documentation references in QUICKSTART.md - Clarify that GET_PAGE_INFO listener is reserved for future use Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- browser-extension/QUICKSTART.md | 3 ++- browser-extension/scripts/content.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/browser-extension/QUICKSTART.md b/browser-extension/QUICKSTART.md index 7716adfd..ed5897f8 100644 --- a/browser-extension/QUICKSTART.md +++ b/browser-extension/QUICKSTART.md @@ -114,8 +114,9 @@ If your DocuElevate server requires authentication: ## Need Help? -- Check the [Troubleshooting Guide](../docs/Troubleshooting.md) +- Check the [Browser Extension Guide](../docs/BrowserExtension.md) for detailed troubleshooting - Review the [API Documentation](../docs/API.md) +- See the main [Troubleshooting Guide](../docs/Troubleshooting.md) for general issues - Open an issue on [GitHub](https://github.com/christianlouis/DocuElevate/issues) --- diff --git a/browser-extension/scripts/content.js b/browser-extension/scripts/content.js index 464232e6..89db0e3b 100644 --- a/browser-extension/scripts/content.js +++ b/browser-extension/scripts/content.js @@ -3,7 +3,7 @@ // This script runs on all web pages to detect file URLs // and enable communication between page content and the extension -// Listen for messages from the popup +// Listen for messages from the popup (reserved for future use) chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { if (message.type === 'GET_PAGE_INFO') { // Return information about the current page @@ -12,7 +12,9 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { title: document.title }; sendResponse(pageInfo); + return true; // Indicates response will be sent asynchronously } + return false; // No async response }); // Detect if current page is a direct file link