Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions injected/src/features/page-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,17 +424,26 @@ export default class PageContext extends ContentFeature {
const content = {
favicon: getFaviconList(),
title: this.getPageTitle(),
metaDescription: this.getMetaDescription(),
content: mainContent,
truncated,
fullContentLength: this.fullContentLength, // Include full content length before truncation
headings: this.getHeadings(),
links: this.getLinks(),
images: this.getImages(),
timestamp: Date.now(),
url: window.location.href,
};

if (this.getFeatureSettingEnabled('includeMetaDescription', 'disabled')) {
content.metaDescription = this.getMetaDescription();
}
if (this.getFeatureSettingEnabled('includeHeadings', 'disabled')) {
content.headings = this.getHeadings();
}
if (this.getFeatureSettingEnabled('includeLinks', 'disabled')) {
content.links = this.getLinks();
}
if (this.getFeatureSettingEnabled('includeImages', 'disabled')) {
content.images = this.getImages();
}

// Cache the result - setter handles timestamp and observer
this.cachedContent = content;
return content;
Expand Down
Loading