Skip to content

Commit

Permalink
fix: web tab injection (#12069)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuanyang233 authored Jan 23, 2025
1 parent 789677c commit 1e95708
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export function querySelectorAll<T extends E>(selector: string) {
export function searchProfileTabListLastChildSelector() {
// :not(:has(a[href^="/i/"])) excludes tab list in trending page. See MF-6382
return querySelector<E>(
'[data-testid="primaryColumn"] div + [role="navigation"][aria-label] [data-testid="ScrollSnap-List"]:not(:has(a[href^="/i/"])) div[role="presentation"]:last-of-type a[role="tab"]',
'[data-testid="primaryColumn"] nav[role="navigation"][aria-label] [data-testid="ScrollSnap-List"]:not(:has(a[href^="/i/"])) div[role="presentation"]:last-of-type a[role="tab"]',
).closest<E>(1)
}
export function nextTabListSelector() {
return querySelector('[data-testid="ScrollSnap-nextButtonWrapper"]')
}
export function searchProfileTabPageSelector() {
return searchProfileTabListLastChildSelector()
.closest(5)
.closest(6)
.querySelector<E>('section > div[aria-label]:not([role="progressbar"])')
}

Expand Down

0 comments on commit 1e95708

Please sign in to comment.