From d63718103568f28aa1d656acc8dfa7180e2b4cfb Mon Sep 17 00:00:00 2001 From: Carlos Alvarez Date: Wed, 29 Jul 2026 18:40:19 -0400 Subject: [PATCH] Fix GitHub repository search --- src/js/lib/pages/github/all.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/js/lib/pages/github/all.js b/src/js/lib/pages/github/all.js index c9171056..9a84d2e6 100644 --- a/src/js/lib/pages/github/all.js +++ b/src/js/lib/pages/github/all.js @@ -1,6 +1,4 @@ -import $ from 'jquery'; import Base from './_base'; -import k2Button from '../../../template/button.github.k2.html'; /** * This class manages the things that happen on *every* GitHub page. All it's doing is adding links to the @@ -19,31 +17,6 @@ export default function () { * Add buttons to the page and setup the event handler */ AllPages.setup = function () { - // Hardcode because it doesn't change, and depending on GitHub markup means - // it breaks every so often - const currentUrl = '/Expensify/Expensify'; - - // Insert K2 button after the Pull requests tab, retrying if the nav hasn't rendered yet - if (!$('li.k2-extension').length) { - const pullsTab = $('nav[aria-label="Repository"] a[href*="/pulls"]').closest('li'); - if (pullsTab.length) { - pullsTab.after(k2Button({url: currentUrl})); - } else { - let retries = 0; - const interval = setInterval(() => { - if ($('li.k2-extension').length || ++retries >= 10) { - clearInterval(interval); - return; - } - const tab = $('nav[aria-label="Repository"] a[href*="/pulls"]').closest('li'); - if (tab.length) { - tab.after(k2Button({url: currentUrl})); - clearInterval(interval); - } - }, 100); - } - } - // Set up timestamp format conversion setTimeout(() => AllPages.applyTimestampFormat(), 500); setInterval(() => AllPages.applyTimestampFormat(), 5000);