From ae6ca57b45b4e4ad201793b8dc7f3535c43de976 Mon Sep 17 00:00:00 2001
From: Federico Brigante <me@fregante.com>
Date: Wed, 1 Nov 2023 12:24:19 +0800
Subject: Meta: Use new `select-dom` API (#6992)

---
 source/features/one-click-pr-or-gist.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'source/features/one-click-pr-or-gist.tsx')

diff --git a/source/features/one-click-pr-or-gist.tsx b/source/features/one-click-pr-or-gist.tsx
index 4b964bab..edafda1c 100644
--- a/source/features/one-click-pr-or-gist.tsx
+++ b/source/features/one-click-pr-or-gist.tsx
@@ -1,6 +1,6 @@
 import './one-click-pr-or-gist.css';
 import React from 'dom-chef';
-import select from 'select-dom';
+import {$, $$, elementExists} from 'select-dom';
 import * as pageDetect from 'github-url-detection';
 
 import features from '../feature-manager.js';
@@ -14,10 +14,10 @@ function init(): void | false {
 		return false;
 	}
 
-	for (const dropdownItem of select.all('.select-menu-item', initialGroupedButtons)) {
-		let title = select('.select-menu-item-heading', dropdownItem)!.textContent.trim();
-		const description = select('.description', dropdownItem)!.textContent.trim();
-		const radioButton = select('input[type=radio]', dropdownItem)!;
+	for (const dropdownItem of $$('.select-menu-item', initialGroupedButtons)) {
+		let title = $('.select-menu-item-heading', dropdownItem)!.textContent.trim();
+		const description = $('.description', dropdownItem)!.textContent.trim();
+		const radioButton = $('input[type=radio]', dropdownItem)!;
 		const classList = ['btn', 'ml-2', 'tooltipped', 'tooltipped-s'];
 
 		if (/\bdraft\b/i.test(title)) {
@@ -49,7 +49,7 @@ void features.add(import.meta.url, {
 		pageDetect.isGist,
 	],
 	exclude: [
-		() => select.exists('[data-show-dialog-id="drafts-upgrade-dialog"]'),
+		() => elementExists('[data-show-dialog-id="drafts-upgrade-dialog"]'),
 	],
 	deduplicate: 'has-rgh',
 	awaitDomReady: true,
-- 
cgit v1.2.3

