Skip to content

Commit 3cd708e

Browse files
committed
rename to scope
1 parent 43c3221 commit 3cd708e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/content.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const isPR = (path) => /^\/[^/]+\/[^/]+\/pull\/\d+/.test(path);
66
const isIssue = (path) => /^\/[^/]+\/[^/]+\/issues\/\d+/.test(path);
77
const getCurrentUser = () => $(".js-menu-target img").attr("alt").slice(1) || "";
88
const isPrivate = () => $(".repo-private-label").length > 0;
9-
let showOrgOnly = false;
9+
let statsScope = "repo";
1010

1111
function getContributor() {
1212
let $contributor = $(".timeline-comment-wrapper .timeline-comment-header-text strong");
@@ -31,7 +31,7 @@ function getContributorInfo() {
3131
};
3232

3333
// global variable
34-
if (showOrgOnly) {
34+
if (statsScope === "org") {
3535
ret.user = org;
3636
}
3737

@@ -211,7 +211,7 @@ ${dropdown}
211211
$inThisRepo.html('in this repo');
212212
$dropdownText.html('across this org');
213213
// global
214-
showOrgOnly = true;
214+
statsScope = "org";
215215
update(getContributorInfo());
216216
});
217217

@@ -222,7 +222,7 @@ ${dropdown}
222222
$acrossThisOrg.html('across this org');
223223
$dropdownText.html('in this repo');
224224
// global
225-
showOrgOnly = false;
225+
statsScope = "repo";
226226
update(getContributorInfo());
227227
});
228228
}

0 commit comments

Comments
 (0)