From ae6ca57b45b4e4ad201793b8dc7f3535c43de976 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Wed, 1 Nov 2023 12:24:19 +0800 Subject: Meta: Use new `select-dom` API (#6992) --- source/github-helpers/get-current-git-ref.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/github-helpers/get-current-git-ref.ts') diff --git a/source/github-helpers/get-current-git-ref.ts b/source/github-helpers/get-current-git-ref.ts index b2d1d1c9..65b9feff 100644 --- a/source/github-helpers/get-current-git-ref.ts +++ b/source/github-helpers/get-current-git-ref.ts @@ -1,5 +1,5 @@ import {isRepoCommitList} from 'github-url-detection'; -import select from 'select-dom'; +import {$} from 'select-dom'; import {extractCurrentBranchFromBranchPicker} from './index.js'; import {branchSelector} from './selectors.js'; @@ -11,7 +11,7 @@ const titleWithGitRef = / at (?[.\w-/]+)( ยท [\w-]+\/[\w-]+)?$/i; export default function getCurrentGitRef(): string | undefined { // Note: This is not in the so it's only available on AJAXed loads. // It appears on every Code page except `commits` on folders/files - const picker = select(branchSelector); + const picker = $(branchSelector); const refViaPicker = picker && extractCurrentBranchFromBranchPicker(picker); if (refViaPicker) { return refViaPicker; @@ -49,7 +49,7 @@ export function getGitRef(pathname: string, title: string): string | undefined { // In , but not reliable https://github.com/refined-github/refined-github/assets/1402241/50357d94-505f-48dc-bd54-74e86b19d642 function getCurrentBranchFromFeed(): string | undefined { - const feedLink = isRepoCommitList() && select('link[type="application/atom+xml"]'); + const feedLink = isRepoCommitList() && $('link[type="application/atom+xml"]'); if (!feedLink) { // Do not throw errors, the element may be missing after AJAX navigation even if on the right page return; -- cgit v1.2.3