Skip to content

Commit

Permalink
Merge branch 'fix/AG-34532' of ssh://bit.int.agrd.dev:7999/adguard-fi…
Browse files Browse the repository at this point in the history
…lters/scriptlets into fix/AG-34532
  • Loading branch information
jellizaveta committed Jul 25, 2024
2 parents 46f05ef + 2b397e1 commit 722b946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

### Fixed

- `trusted-click-element` scriptlet does not click on an element that is already in the DOM. [#437]
- `trusted-click-element` scriptlet does not click on an element that is already in the DOM [#437]

[Unreleased]: https://github.com/AdguardTeam/Scriptlets/compare/v1.11.6...HEAD
[#435]: https://github.com/AdguardTeam/Scriptlets/issues/435
Expand Down
3 changes: 2 additions & 1 deletion src/scriptlets/trusted-click-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,14 @@ export function trustedClickElement(
};

/**
* Query all selectors from queue on each mutation
* Queries all selectors from queue on each mutation
*
* We start looking for elements before possible delay is over, to avoid cases
* when delay is getting off after the last mutation took place.
*
*/
const findElements = (mutations: MutationRecord[], observer: MutationObserver) => {
// TODO: try to make the function cleaner — avoid usage of selectorsSequence from the outer scope
selectorsSequence = fulfillAndHandleSelectors();

// Disconnect observer after finding all elements
Expand Down

0 comments on commit 722b946

Please sign in to comment.