Skip to content

Commit ff824e7

Browse files
committed
fix: enhance mutation detection logic to include next and previous siblings
1 parent b0668fe commit ff824e7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

userscript/source/vuejsawait.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ export function AttachVueSettledEvents(TargetEl: HTMLElement, Options: { QuietMs
7575
LastMutationAt = performance.now()
7676

7777
EmitChange(Mutations)
78-
if (Mutations.flatMap(Mutation => [...Mutation.addedNodes, ...Mutation.removedNodes, ...Mutation.target ? [Mutation.target] : []]).length >= 15) {
78+
if (Mutations.flatMap(Mutation => [
79+
...Mutation.addedNodes, ...Mutation.removedNodes,
80+
...Mutation.nextSibling ? [Mutation.nextSibling] : [],
81+
...Mutation.previousSibling ? [Mutation.previousSibling] : [],
82+
...(Mutation.target ? [Mutation.target] : [])
83+
]).length >= 15) {
7984
ArmSettledTimer()
8085
}
8186
EmitUrlChange()

0 commit comments

Comments
 (0)