summaryrefslogtreecommitdiff
path: root/source/features/actionable-pr-view-file.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/actionable-pr-view-file.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/actionable-pr-view-file.tsx')
-rw-r--r--source/features/actionable-pr-view-file.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/features/actionable-pr-view-file.tsx b/source/features/actionable-pr-view-file.tsx
index 6fe2f4fd..5a5af0e6 100644
--- a/source/features/actionable-pr-view-file.tsx
+++ b/source/features/actionable-pr-view-file.tsx
@@ -1,4 +1,4 @@
-import select from 'select-dom';
+import {$, elementExists} from 'select-dom';
import * as pageDetect from 'github-url-detection';
import features from '../feature-manager.js';
@@ -25,9 +25,9 @@ void features.add(import.meta.url, {
exclude: [
// Editing files doesn't make sense after a PR is closed/merged
pageDetect.isClosedPR,
- () => select('.head-ref')!.title === 'This repository has been deleted',
+ () => $('.head-ref')!.title === 'This repository has been deleted',
// If you're viewing changes from partial commits, ensure you're on the latest one.
- () => select.exists('.js-commits-filtered') && !select.exists('[aria-label="You are viewing the latest commit"]'),
+ () => elementExists('.js-commits-filtered') && !elementExists('[aria-label="You are viewing the latest commit"]'),
],
awaitDomReady: true, // DOM-based filters, feature is invisible and inactive until dropdown is opened
init,