Skip to content

Commit 7230c5f

Browse files
Default disable page-context features that aren't currently used
1 parent 6f24908 commit 7230c5f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

injected/src/features/page-context.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,17 +424,26 @@ export default class PageContext extends ContentFeature {
424424
const content = {
425425
favicon: getFaviconList(),
426426
title: this.getPageTitle(),
427-
metaDescription: this.getMetaDescription(),
428427
content: mainContent,
429428
truncated,
430429
fullContentLength: this.fullContentLength, // Include full content length before truncation
431-
headings: this.getHeadings(),
432-
links: this.getLinks(),
433-
images: this.getImages(),
434430
timestamp: Date.now(),
435431
url: window.location.href,
436432
};
437433

434+
if (this.getFeatureSettingEnabled('includeMetaDescription', 'disabled')) {
435+
content.metaDescription = this.getMetaDescription();
436+
}
437+
if (this.getFeatureSettingEnabled('includeHeadings', 'disabled')) {
438+
content.headings = this.getHeadings();
439+
}
440+
if (this.getFeatureSettingEnabled('includeLinks', 'disabled')) {
441+
content.links = this.getLinks();
442+
}
443+
if (this.getFeatureSettingEnabled('includeImages', 'disabled')) {
444+
content.images = this.getImages();
445+
}
446+
438447
// Cache the result - setter handles timestamp and observer
439448
this.cachedContent = content;
440449
return content;

0 commit comments

Comments
 (0)