fix: address code review feedback for browser extension

- Removed unused variables in capture.js (clonedDoc, styles array)
- Added explicit return values for message handlers in content.js
- Added detailed comment explaining 500ms render delay before PDF conversion
- Updated PERMISSIONS.md with comprehensive explanation of host_permissions requirement
- Updated test.html with web clipping test scenarios
- Improved code consistency and documentation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 23:27:57 +00:00
parent 5380c6de6c
commit 7fc8dd655a
5 changed files with 167 additions and 145 deletions
+3 -1
View File
@@ -152,7 +152,9 @@ async function convertHtmlToPdf(html) {
chrome.tabs.onUpdated.addListener(listener);
});
// Give it a bit more time to render
// Wait for page to fully render before PDF conversion
// This delay ensures JavaScript execution, dynamic content rendering,
// and CSS transitions have completed. May need adjustment for complex pages.
await new Promise(resolve => setTimeout(resolve, 500));
// Use Chrome's print to PDF API