Added square brackets to match too for the points
This commit is contained in:
parent
184080a179
commit
0c1700090f
1 changed files with 4 additions and 4 deletions
|
@ -2,10 +2,10 @@ var calculateIssuePoints = function () {
|
|||
let links = document.getElementsByClassName('js-project-card-issue-link');
|
||||
for (let count = 0; count < links.length; count++) {
|
||||
let link = links[count];
|
||||
let points_mark = link.text.match(/^\(\d+\)*/);
|
||||
let points_mark = link.text.match(/^[\(\[]\d+[\)\]]/);
|
||||
if (points_mark) {
|
||||
let points = points_mark[0].replace(/\(|\)/g, '');
|
||||
link.innerHTML = link.text.replace(/^\(\d+\)/, '<span class="issue-points">' + points + '</span>');
|
||||
let points = points_mark[0].replace(/\(|\)|\[|\]/g, '');
|
||||
link.innerHTML = link.text.replace(/[\(\[]\d+[\)\]]/, '<span class="issue-points">' + points + '</span>');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -78,4 +78,4 @@ var updatePoints = function () {
|
|||
drawProgressBars(to_do, doing, done);
|
||||
};
|
||||
|
||||
window.setInterval(updatePoints, 2000);
|
||||
window.setInterval(updatePoints, 3000);
|
||||
|
|
Loading…
Reference in a new issue