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/features/linkify-code.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/features/linkify-code.tsx') 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); } } -- cgit v1.2.3