diff --git a/githubpoints-projects.js b/githubpoints-projects.js index aefc58b..e9921ae 100644 --- a/githubpoints-projects.js +++ b/githubpoints-projects.js @@ -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+\)/, '' + points + ''); + let points = points_mark[0].replace(/\(|\)|\[|\]/g, ''); + link.innerHTML = link.text.replace(/[\(\[]\d+[\)\]]/, '' + points + ''); } }; }; @@ -78,4 +78,4 @@ var updatePoints = function () { drawProgressBars(to_do, doing, done); }; -window.setInterval(updatePoints, 2000); +window.setInterval(updatePoints, 3000);