Skip to content

Commit 5012bb7

Browse files
committed
Added stars count to user starred section - format fix
1 parent d791e98 commit 5012bb7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

[email protected]/lib/status_bar_indicator.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,15 @@ export class StatusBarIndicator extends PanelMenu.Button {
636636
function toItem(e, textLengthLimiter) {
637637
const stars = e[`stargazers_count`]
638638

639+
function formatNumber(stringNumber) {
640+
return String(stringNumber).split(``).reverse().join(``).replace(/(\d{3})/g, `$1 `).split(``).reverse().join(``).trim();
641+
}
642+
639643
return {
640644
"iconName": `starred-symbolic`,
641645
"text": e[`full_name`].slice(0, textLengthLimiter),
642646
"callback": () => openUrl(e[`html_url`]),
643-
"endButtonText": `${stars} stars`,
647+
"endButtonText": `${formatNumber(stars)} stars`,
644648
"endButtonCallback": () => { },
645649
}
646650
}

[email protected]/lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = `3.19.0`
1+
export const VERSION = `3.21.0`

0 commit comments

Comments
 (0)