fix(browser): improve error handling and code quality

- Fix response.json() called before checking response.ok in popup.js
- Consolidate duplicate onInstalled listeners in background.js
- Remove unnecessary return true from content.js message handler
- Add better error handling for non-JSON responses
- Improve user experience by not auto-opening popup on install

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-12 03:09:33 +00:00
parent 5d42e03b90
commit 142c19ef50
3 changed files with 19 additions and 21 deletions
-2
View File
@@ -12,9 +12,7 @@ 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