diff options
author | 2023-11-01 12:24:19 +0800 | |
---|---|---|
committer | 2023-11-01 04:24:19 +0000 | |
commit | ae6ca57b45b4e4ad201793b8dc7f3535c43de976 (patch) | |
tree | 679608ff74b842731d0a1ce8591d2c17dd727010 /source/features/linkify-code.tsx | |
parent | 4a9e021202ceb76962d08d70ecab2ec9becab8d9 (diff) | |
download | refined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.tar.gz refined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.tar.zst refined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.zip |
Meta: Use new `select-dom` API (#6992)
Diffstat (limited to '')
-rw-r--r-- | source/features/linkify-code.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/features/linkify-code.tsx b/source/features/linkify-code.tsx index e7d444b5..d272e906 100644 --- a/source/features/linkify-code.tsx +++ b/source/features/linkify-code.tsx @@ -1,4 +1,4 @@ -import select from 'select-dom'; +import {$$, elementExists} from 'select-dom'; import * as pageDetect from 'github-url-detection'; import observe from '../helpers/selector-observer.js'; @@ -13,7 +13,7 @@ function initTitle(signal: AbortSignal): void { observe('.js-issue-title', title => { // TODO: Replace with :has - if (!select.exists('a', title)) { + if (!elementExists('a', title)) { linkifyIssues(currentRepo, title); } }, {signal}); @@ -30,7 +30,7 @@ function linkifyContent(wrapper: Element): void { // https://github.com/refined-github/refined-github/pull/3844#issuecomment-751427568 if (!pageDetect.isGist()) { const currentRepo = getRepo() ?? {}; - for (const element of select.all('.pl-c', wrapper)) { + for (const element of $$('.pl-c', wrapper)) { linkifyIssues(currentRepo, element); } } |