summaryrefslogtreecommitdiff
path: root/source/features/toggle-files-button.tsx
diff options
context:
space:
mode:
authorGravatar Florent <cheap.glitch@gmail.com> 2021-07-16 09:39:11 +0200
committerGravatar GitHub <noreply@github.com> 2021-07-16 14:39:11 +0700
commitafa8da1a27e80f6364a3e68ab4b4c5a7c1916d2e (patch)
tree7cecc0d3db9ed9909510e41bcb7a0248ac1df2eb /source/features/toggle-files-button.tsx
parent285eaec360f21431757236c6c39cdbe6f303f6e2 (diff)
downloadrefined-github-afa8da1a27e80f6364a3e68ab4b4c5a7c1916d2e.tar.gz
refined-github-afa8da1a27e80f6364a3e68ab4b4c5a7c1916d2e.tar.zst
refined-github-afa8da1a27e80f6364a3e68ab4b4c5a7c1916d2e.zip
Restore `toggle-files-button` (#4559)
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 10628c58..650b7819 100644
--- a/source/features/toggle-files-button.tsx
+++ b/source/features/toggle-files-button.tsx
@@ -13,12 +13,12 @@ import observeElement from '../helpers/simplified-element-observer';
const cacheKey = 'files-hidden';
function addButton(): void {
- const filesHeader = select('.Box-header--blue .Details > :last-child > ul');
- if (!filesHeader || select.exists('.rgh-toggle-files')) {
+ const commitsInfo = select('.repository-content .octicon-history')?.closest('ul');
+ if (!commitsInfo || select.exists('.rgh-toggle-files')) {
return;
}
- filesHeader.append(
+ commitsInfo.append(
<button
type="button"
className="btn-octicon rgh-toggle-files"