mirror of
https://github.com/yamadashy/repomix.git
synced 2026-10-22 05:15:16 +02:00
intent(browser-tests): CodeRabbit review — tests duplicated the selector expression and could pass while the production selector logic broke decision(browser-structure): extracted findNavigationContainer into utils/github-navigation.ts because every file under entrypoints/ becomes an extension entrypoint in wxt, so the helper cannot be exported from content.ts for tests constraint(browser-tests): importing content.ts in vitest is not possible without wxt test shims — defineContentScript is a wxt auto-import global Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9 lines
429 B
TypeScript
9 lines
429 B
TypeScript
// GitHub is rolling out a React-based repository header that replaces the
|
|
// legacy `ul.pagehead-actions` list with `ul[data-testid="repo-header-actions"]`.
|
|
// Keep the legacy selector as a fallback while the rollout is in progress.
|
|
export function findNavigationContainer(): Element | null {
|
|
return (
|
|
document.querySelector('ul[data-testid="repo-header-actions"]') ?? document.querySelector('ul.pagehead-actions')
|
|
);
|
|
}
|