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