From da89c8ee20aa2d9ce8ac4fb5fc7225265539a8ab Mon Sep 17 00:00:00 2001
From: Federico Brigante <me@fregante.com>
Date: Sun, 25 Sep 2022 16:36:04 +0700
Subject: Warp speed 🚀 (#6006)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 source/features/clean-repo-filelist-actions.tsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'source/features/clean-repo-filelist-actions.tsx')

diff --git a/source/features/clean-repo-filelist-actions.tsx b/source/features/clean-repo-filelist-actions.tsx
index 09e60ea5..19461ece 100644
--- a/source/features/clean-repo-filelist-actions.tsx
+++ b/source/features/clean-repo-filelist-actions.tsx
@@ -1,9 +1,9 @@
 import React from 'dom-chef';
 import select from 'select-dom';
-import {observe} from 'selector-observer';
 import * as pageDetect from 'github-url-detection';
 import {PlusIcon, SearchIcon, CodeIcon} from '@primer/octicons-react';
 
+import observe from '../helpers/selector-observer';
 import {wrap} from '../helpers/dom-utils';
 import features from '../feature-manager';
 
@@ -16,7 +16,7 @@ function addTooltipToSummary(childElement: Element, tooltip: string): void {
 }
 
 function cleanFilelistActions(searchButton: Element): void {
-	searchButton.classList.add('tooltipped', 'tooltipped-ne', 'rgh-repo-filelist-actions');
+	searchButton.classList.add('tooltipped', 'tooltipped-ne');
 	searchButton.setAttribute('aria-label', 'Go to file');
 
 	// Replace "Go to file" with  icon
@@ -49,11 +49,9 @@ function cleanFilelistActions(searchButton: Element): void {
 	}
 }
 
-function init(): Deinit {
+function init(signal: AbortSignal): void {
 	// `.btn` selects the desktop version
-	return observe('.btn[data-hotkey="t"]:not(.rgh-repo-filelist-actions)', {
-		add: cleanFilelistActions,
-	});
+	observe('.btn[data-hotkey="t"]', cleanFilelistActions, {signal});
 }
 
 void features.add(import.meta.url, {
@@ -61,6 +59,6 @@ void features.add(import.meta.url, {
 		pageDetect.isRepoTree,
 		pageDetect.isSingleFile,
 	],
-	deduplicate: 'has-rgh-inner',
+	awaitDomReady: false,
 	init,
 });
-- 
cgit v1.2.3

