diff options
author | 2022-07-05 23:26:44 +0700 | |
---|---|---|
committer | 2022-07-05 23:26:44 +0700 | |
commit | 88e2668dbc0fbdd7c78af2747c1f022309289eea (patch) | |
tree | 92e8dbb29efd0883a57c73bc8e0427cb93cf1654 /source/features/toggle-files-button.tsx | |
parent | f6cd9d243fdc3e5facb56085274c7cf92c4053e6 (diff) | |
download | refined-github-88e2668dbc0fbdd7c78af2747c1f022309289eea.tar.gz refined-github-88e2668dbc0fbdd7c78af2747c1f022309289eea.tar.zst refined-github-88e2668dbc0fbdd7c78af2747c1f022309289eea.zip |
Add `has()` selector helper (#5518)
Diffstat (limited to 'source/features/toggle-files-button.tsx')
-rw-r--r-- | source/features/toggle-files-button.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/features/toggle-files-button.tsx b/source/features/toggle-files-button.tsx index 46fdfa82..5be12df0 100644 --- a/source/features/toggle-files-button.tsx +++ b/source/features/toggle-files-button.tsx @@ -8,6 +8,7 @@ import * as pageDetect from 'github-url-detection'; import {FoldIcon, UnfoldIcon, ArrowUpIcon} from '@primer/octicons-react'; import features from '.'; +import selectHas from '../helpers/select-has'; import attachElement from '../helpers/attach-element'; import observeElement from '../helpers/simplified-element-observer'; @@ -21,7 +22,7 @@ const noticeStyle = {paddingRight: '19px'}; function addButton(): void { attachElement({ - anchor: select('.repository-content .octicon-history')?.closest('ul'), + anchor: selectHas('.repository-content ul:has(.octicon-history)')!, allowMissingAnchor: true, className: toggleButtonClass, position: 'append', |