summaryrefslogtreecommitdiff
path: root/source/features/toggle-files-button.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2023-11-01 12:24:19 +0800
committerGravatar GitHub <noreply@github.com> 2023-11-01 04:24:19 +0000
commitae6ca57b45b4e4ad201793b8dc7f3535c43de976 (patch)
tree679608ff74b842731d0a1ce8591d2c17dd727010 /source/features/toggle-files-button.tsx
parent4a9e021202ceb76962d08d70ecab2ec9becab8d9 (diff)
downloadrefined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.tar.gz
refined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.tar.zst
refined-github-ae6ca57b45b4e4ad201793b8dc7f3535c43de976.zip
Meta: Use new `select-dom` API (#6992)
Diffstat (limited to 'source/features/toggle-files-button.tsx')
-rw-r--r--source/features/toggle-files-button.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/features/toggle-files-button.tsx b/source/features/toggle-files-button.tsx
index 40c8ee39..7f6ffd9c 100644
--- a/source/features/toggle-files-button.tsx
+++ b/source/features/toggle-files-button.tsx
@@ -1,5 +1,5 @@
import './toggle-files-button.css';
-import select from 'select-dom';
+import {$} from 'select-dom';
import {CachedValue} from 'webext-storage-cache';
import React from 'dom-chef';
import delegate, {DelegateEvent} from 'delegate-it';
@@ -14,7 +14,7 @@ const wereFilesHidden = new CachedValue<boolean>('files-hidden');
const toggleButtonClass = 'rgh-toggle-files';
function addButton(filesBox: HTMLElement): void {
- select('ul:has(.octicon-history)', filesBox)?.append(
+ $('ul:has(.octicon-history)', filesBox)?.append(
<button
type="button"
className={`btn-octicon ${toggleButtonClass}`}
@@ -31,7 +31,7 @@ type Targets = {
};
function getTargets(): Targets {
- const fileList = select('[aria-labelledby="files"]')!;
+ const fileList = $('[aria-labelledby="files"]')!;
const buttonWrapper = fileList.nextElementSibling!;
return {fileList, buttonWrapper};
}