diff --git a/packages/tswebextension/CHANGELOG.md b/packages/tswebextension/CHANGELOG.md index eb1cb9f47..40d1cff3c 100644 --- a/packages/tswebextension/CHANGELOG.md +++ b/packages/tswebextension/CHANGELOG.md @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [1.0.28] - 2024-07-08 + +### Fixed + +- CssHitsCounter logs elements blocked by elemhide rules. + +[1.0.28]: https://github.com/AdguardTeam/tsurlfilter/releases/tag/tswebextension-v1.0.28 + ## [1.0.27] - 2024-07-08 ### Changed diff --git a/packages/tswebextension/src/lib/mv2/content-script/css-hits-counter.ts b/packages/tswebextension/src/lib/mv2/content-script/css-hits-counter.ts index 0fac3e64e..78484601c 100644 --- a/packages/tswebextension/src/lib/mv2/content-script/css-hits-counter.ts +++ b/packages/tswebextension/src/lib/mv2/content-script/css-hits-counter.ts @@ -260,7 +260,7 @@ export class CssHitsCounter { elements: NodeListOf | Element[], start: number, length: number | null, - ): { filterId: number; ruleText: string; element: string }[] { + ): ICountedElement[] { const RULE_FILTER_SEPARATOR = ';'; start = start || 0; length = length || elements.length; @@ -284,7 +284,7 @@ export class CssHitsCounter { result.push({ filterId, ruleText, - element: ElementUtils.elementToString(element), + element: this.elementToString ? ElementUtils.elementToString(element) : element, }); }