diff options
-rw-r--r-- | source/features/pr-jump-to-first-non-viewed-file.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/features/pr-jump-to-first-non-viewed-file.tsx b/source/features/pr-jump-to-first-non-viewed-file.tsx index eb1f2d2c..59859c51 100644 --- a/source/features/pr-jump-to-first-non-viewed-file.tsx +++ b/source/features/pr-jump-to-first-non-viewed-file.tsx @@ -6,7 +6,7 @@ import * as pageDetect from 'github-url-detection'; import features from '../feature-manager.js'; function jumpToFirstNonViewed(): void { - const firstNonViewedFile = $('.file:not([data-file-user-viewed])')!; + const firstNonViewedFile = $('[id][data-details-container-group="file"]:not([data-file-user-viewed])')!; if (firstNonViewedFile) { // Scroll to file without pushing to history location.replace('#' + firstNonViewedFile.id); @@ -32,3 +32,12 @@ void features.add(import.meta.url, { ], init, }); + +/* + +Test URLs: + +PR: https://github.com/refined-github/sandbox/pull/55/files +Large PR https://github.com/pixiebrix/pixiebrix-extension/pull/6808/files + +*/ |