diff options
author | 2023-11-07 13:19:22 +0100 | |
---|---|---|
committer | 2023-11-07 20:19:22 +0800 | |
commit | 4bf9306fd02592ab851cd1a5d85b900817ad4d04 (patch) | |
tree | 703492c059a548f54ae9a76e344879cd9cff4e55 | |
parent | 539980750d8dd745f080c25400b0cf85855903a3 (diff) | |
download | refined-github-4bf9306fd02592ab851cd1a5d85b900817ad4d04.tar.gz refined-github-4bf9306fd02592ab851cd1a5d85b900817ad4d04.tar.zst refined-github-4bf9306fd02592ab851cd1a5d85b900817ad4d04.zip |
`pr-jump-to-first-non-viewed-file` - Restore feature in all PRs (#7033)
Co-authored-by: Federico Brigante <me@fregante.com>
-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 + +*/ |