Skip to content

Commit

Permalink
fix: dao and web3 tab inject selector (#10483)
Browse files Browse the repository at this point in the history
  • Loading branch information
lelenei committed Aug 18, 2023
1 parent 9f165a9 commit c3514d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ export function injectProfileTabAtTwitter(signal: AbortSignal) {
shadowRootDelegatesFocus: false,
})
attachReactTreeWithContainer(watcher.firstDOMProxy.afterShadow, { signal }).render(
<>
<div style={{ display: 'flex' }}>
<ProfileTabForTokenAndPersona />
<ProfileTabForDAO />
</>,
</div>,
)
tabInjected = true
}
Expand Down
7 changes: 3 additions & 4 deletions packages/mask/src/site-adaptors/twitter.com/utils/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ export const querySelectorAll = <T extends E>(selector: string) => {
// #region "Enhanced Profile"
export const searchProfileTabListLastChildSelector: () => LiveSelector<E, true> = () =>
querySelector<E>(
'[data-testid="primaryColumn"] div + [role="navigation"][aria-label] [data-testid="ScrollSnap-nextButtonWrapper"]',
)

'[data-testid="primaryColumn"] div + [role="navigation"][aria-label] [data-testid="ScrollSnap-List"] a[href*="/like"]',
).closest(1)
export const searchProfileTabPageSelector = () =>
searchProfileTabListLastChildSelector()
.closest(3)
.closest(5)
.querySelector<E>('section > div[aria-label]:not([role="progressbar"])')

export const searchProfileTabLoseConnectionPageSelector: () => LiveSelector<E, true> = () =>
Expand Down

0 comments on commit c3514d6

Please sign in to comment.