Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89f6ca5

Browse files
authored
open-all-conversations - Exclude issue views list (refined-github#9928)
1 parent 0ba2556 commit 89f6ca5

3 files changed

Lines changed: 15 additions & 17 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"filter-altered-clicks": "^2.1.1",
4444
"flat-zip": "^1.0.1",
4545
"github-reserved-names": "^2.2.0",
46-
"github-url-detection": "^11.2.3",
46+
"github-url-detection": "^11.2.4",
4747
"indent-textarea": "^4.0.0",
4848
"js-abbreviation-number": "^1.4.0",
4949
"linkify-issues": "^4.2.0",

source/features/open-all-conversations.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import observe from '../helpers/selector-observer.js';
1111
function 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

3838
function 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 {
6268
async 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

Comments
 (0)