@@ -11,7 +11,7 @@ import observe from '../helpers/selector-observer.js';
1111function onButtonClick ( ) : void {
1212 const links = $$ ( [
1313 'a[data-testid="issue-pr-title-link"]' ,
14- // TODO [2026 -01-01]: Pre-React selector; Drop
14+ // TODO [2027 -01-01]: Drop if PR lists have turned React
1515 'a.h4.js-navigation-open' ,
1616 ] ) ;
1717
@@ -21,7 +21,7 @@ function onButtonClick(): void {
2121
2222 const selectedLinks = links . filter ( link =>
2323 closestElementOptional ( [
24- // TODO [2026 -01-01]: Pre-React selector; Drop
24+ // TODO [2027 -01-01]: Drop if PR lists have turned React
2525 '.js-issue-row.selected' ,
2626 '[aria-label^="Selected"]' ,
2727 ] , link ) ,
@@ -36,9 +36,15 @@ function onButtonClick(): void {
3636}
3737
3838function add ( anchor : HTMLElement ) : void {
39+ // TODO: Drop after https://github.com/refined-github/refined-github/issues/9893
40+ if ( closestElementOptional ( '[class*="RepositoryViews"]' , anchor ) ) {
41+ // The user navigate to https://github.com/refined-github/refined-github/issues/views but the previous observer was not unloaded
42+ return ;
43+ }
44+
3945 const isLegacy = closestElementOptional ( '.table-list-header-toggle' , anchor ) ;
4046 const isSelected = closestElementOptional ( [
41- // TODO [2026 -01-01]: Pre-React selector; Drop
47+ // TODO [2027 -01-01]: Drop if PR lists have turned React
4248 '.table-list-triage' ,
4349 '[aria-label="Bulk actions"]' ,
4450 ] , anchor ) ;
@@ -62,7 +68,7 @@ function add(anchor: HTMLElement): void {
6268async function init ( signal : AbortSignal ) : Promise < void | false > {
6369 observe (
6470 [
65- // TODO [2026 -01-01]: Pre-React selector; Drop
71+ // TODO [2027 -01-01]: Drop if PR lists have turned React
6672 '.table-list-header-toggle:not(.states)' ,
6773 '[aria-label="Bulk actions"] > :first-child' ,
6874 '[aria-label="Actions"] > :first-child' ,
@@ -77,14 +83,6 @@ void features.add(import.meta.url, {
7783 include : [
7884 pageDetect . isIssueOrPRList ,
7985 ] ,
80- exclude : [
81- pageDetect . isGlobalIssueOrPRList ,
82- ] ,
83- init,
84- } , {
85- include : [
86- pageDetect . isGlobalIssueOrPRList ,
87- ] ,
8886 init,
8987} ) ;
9088
0 commit comments