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>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-12 03:08:20 +00:00
parent 5cc34d6a72
commit 5d42e03b90
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -114,8 +114,9 @@ If your DocuElevate server requires authentication:
## Need Help? ## 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) - 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) - Open an issue on [GitHub](https://github.com/christianlouis/DocuElevate/issues)
--- ---
+3 -1
View File
@@ -3,7 +3,7 @@
// This script runs on all web pages to detect file URLs // This script runs on all web pages to detect file URLs
// and enable communication between page content and the extension // 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) => { chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.type === 'GET_PAGE_INFO') { if (message.type === 'GET_PAGE_INFO') {
// Return information about the current page // Return information about the current page
@@ -12,7 +12,9 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
title: document.title title: document.title
}; };
sendResponse(pageInfo); sendResponse(pageInfo);
return true; // Indicates response will be sent asynchronously
} }
return false; // No async response
}); });
// Detect if current page is a direct file link // Detect if current page is a direct file link