Skip to content

Commit c9f6105

Browse files
committed
Fix bug introduced in v1.7 of github_repo_network_tab.user.js
1 parent 591e709 commit c9f6105

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github_repo_network_tab.user.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// @exclude-match https://github.com/topics*
2626
// @exclude-match https://github.com/trending*
2727
// @exclude-match https://github.com/users/*/projects/*
28-
// @version 1.7
28+
// @version 1.7.1
2929
// @createdAt 4/06/2020
3030
// @author StaticPH
3131
// @description Adds a navigation tab for faster access to the 'Network' page of a repository.
@@ -84,7 +84,7 @@
8484
//TODO: Consider insertion at Nth element position, rather than relative to PR tab.
8585
setTimeout(function wait(){
8686
/* Find the 'Pull Requests' tab; inserting the new Network tab immediately after it ensures consistent placement. */
87-
const repoPullsTab = document.querySelectorAll('[data-seleced-links*="repo_pulls"]');
87+
const repoPullsTab = document.querySelectorAll('[data-selected-links*="repo_pulls"]');
8888
const dropdownRetryLimit = 5;
8989
let dropdownRetries = 0;
9090

@@ -93,7 +93,7 @@
9393
repoPullsTab[0].insertAdjacentHTML('afterend', createBigNetworkTabHTML());
9494
document.getElementById('bigNetworkTab') && console.debug('Added big Network tab.');
9595

96-
if (repoPullsTab.length >= 1){
96+
if (repoPullsTab.length > 1){
9797
repoPullsTab[1].insertAdjacentHTML('afterend', createSmallNetworkTabHTML());
9898
document.getElementById('smallNetworkTab') && console.debug('Added small Network tab.');
9999
}

0 commit comments

Comments
 (0)