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:
@@ -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)
|
||||
|
||||
---
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user