summaryrefslogtreecommitdiff
path: root/source/features/toggle-files-button.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2022-09-25 21:46:26 +0700
committerGravatar Federico Brigante <me@fregante.com> 2022-09-25 21:46:26 +0700
commit799fcd89db5fc199aebc9ae8c01efdb60d35f635 (patch)
tree89530a667ef8a0a91913917bf2e7c63524aa752d /source/features/toggle-files-button.tsx
parent184cbf98313f40771730819dd23904827d3cd81b (diff)
downloadrefined-github-799fcd89db5fc199aebc9ae8c01efdb60d35f635.tar.gz
refined-github-799fcd89db5fc199aebc9ae8c01efdb60d35f635.tar.zst
refined-github-799fcd89db5fc199aebc9ae8c01efdb60d35f635.zip
Meta: Inline anchor as parameter in attachElement(s)
Diffstat (limited to 'source/features/toggle-files-button.tsx')
-rw-r--r--source/features/toggle-files-button.tsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/features/toggle-files-button.tsx b/source/features/toggle-files-button.tsx
index 749c3cfc..8ca2618b 100644
--- a/source/features/toggle-files-button.tsx
+++ b/source/features/toggle-files-button.tsx
@@ -20,8 +20,7 @@ const noticeClass = 'rgh-files-hidden-notice';
const noticeStyle = {paddingRight: '19px'};
function addButton(filesBox: HTMLElement): void {
- attachElement({
- anchor: selectHas('ul:has(.octicon-history)', filesBox)!,
+ attachElement(selectHas('ul:has(.octicon-history)', filesBox)!, {
allowMissingAnchor: true,
className: toggleButtonClass,
append: () => (
@@ -39,8 +38,7 @@ function addButton(filesBox: HTMLElement): void {
function addFilesHiddenNotice(fileBox: Element): void {
// Add notice so the user knows that the list was collapsed #5524
- attachElement({
- anchor: fileBox,
+ attachElement(fileBox, {
className: noticeClass,
after: () => (
<div