refactor: optimize selection capture and remove dead code

- Removed Node.js export from capture.js (browser-only code)
- Simplified selection capture to avoid expensive getComputedStyle() calls
- Added performance notes for selection clipping
- Aligned content.js with capture.js implementation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 23:31:06 +00:00
parent 7fc8dd655a
commit dd2608bcb0
2 changed files with 6 additions and 29 deletions
+2 -8
View File
@@ -46,6 +46,8 @@ function captureFullPage() {
/**
* Capture selected content from the page
* Note: For performance, selection clipping uses basic HTML structure without
* per-element computed styles. The resulting PDF will use browser default styles.
* @returns {Object} Selection data with HTML, text, and metadata
*/
function captureSelection() {
@@ -92,11 +94,3 @@ function captureSelection() {
timestamp: new Date().toISOString()
};
}
// Export functions for use in other scripts
if (typeof module !== 'undefined' && module.exports) {
module.exports = {
captureFullPage,
captureSelection
};
}