From 2407c6bf1cc738a6ce3425d42483cc04520404a6 Mon Sep 17 00:00:00 2001 From: Federico Date: Mon, 13 Jul 2026 00:28:59 +0800 Subject: [PATCH] Deprecate `isRepoFile404` --- index.test.ts | 10 ---------- index.ts | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/index.test.ts b/index.test.ts index 8ac2212..93fefd6 100644 --- a/index.test.ts +++ b/index.test.ts @@ -134,16 +134,6 @@ test('isPRFile404', () => { assert.equal(pageDetect.isPRFile404(), false); }); -test('isRepoFile404', () => { - document.title = 'File not found'; - location.href = 'https://github.com/fregante/GhostText/tree/3cacd7df71b097dc525d99c7aa2f54d31b02fcc8/chrome/scripts/InputArea'; - assert.ok(pageDetect.isRepoFile404()); - - document.title = 'File not found'; - location.href = 'https://github.com/refined-github/refined-github/blob/some-non-existent-ref/source/features/bugs-tab.tsx'; - assert.ok(pageDetect.isRepoFile404()); -}); - const {getRepositoryInfo} = pageDetect.utils; test('getRepositoryInfo', () => { const inputTypes = [ diff --git a/index.ts b/index.ts index 0fe5963..5578cef 100644 --- a/index.ts +++ b/index.ts @@ -748,6 +748,7 @@ TEST: addTests('isFileFinder', [ ]); /** + * @deprecated Use is404 and isSingleFile/isRepoTree directly * @example https://github.com/fregante/GhostText/tree/3cacd7df71b097dc525d99c7aa2f54d31b02fcc8/chrome/scripts/InputArea * @example https://github.com/refined-github/refined-github/blob/some-non-existent-ref/source/features/bugs-tab.tsx */