Skip to content

Commit

Permalink
AG-593 fix element to string for elements
Browse files Browse the repository at this point in the history
Merge in ADGUARD-FILTERS/tsurlfilter from fix/AG-593-1 to master

Squashed commit of the following:

commit 89ddb5c
Merge: 879813d 72c3e2c
Author: Maxim Topciu <[email protected]>
Date:   Mon Jul 8 16:53:52 2024 +0300

    Merge remote-tracking branch 'origin/master' into fix/AG-593-1

commit 879813d
Author: Maxim Topciu <[email protected]>
Date:   Mon Jul 8 16:36:03 2024 +0300

    AG-593 update changelog

commit 8f452ce
Author: Maxim Topciu <[email protected]>
Date:   Mon Jul 8 16:29:49 2024 +0300

    AG-593 fix element to string for elements
  • Loading branch information
maximtop committed Jul 8, 2024
1 parent 72c3e2c commit 2adf5b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions packages/tswebextension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- TODO: manually add compare links for version changes -->
<!-- e.g. [0.1.2]: https://github.com/AdguardTeam/tsurlfilter/compare/tswebextension-v0.1.1...tswebextension-v0.1.2 -->

## [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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class CssHitsCounter {
elements: NodeListOf<Element> | Element[],
start: number,
length: number | null,
): { filterId: number; ruleText: string; element: string }[] {
): ICountedElement[] {
const RULE_FILTER_SEPARATOR = ';';
start = start || 0;
length = length || elements.length;
Expand All @@ -284,7 +284,7 @@ export class CssHitsCounter {
result.push({
filterId,
ruleText,
element: ElementUtils.elementToString(element),
element: this.elementToString ? ElementUtils.elementToString(element) : element,
});
}

Expand Down

0 comments on commit 2adf5b5

Please sign in to comment.