window.onload = function () { var calculateIssuePoints = function { document.getElementsByClassName.forEach(function(link) { let points_mark = link.text.match(/^\(\d+\)*/); if (points) { let points = points_mark[0].replace(/\(\)/g, ''); link.text = link.text.replace(/^\(\d+\)/, '' + points + ''); } }); }; var updatePoints = function () { calculateIssuePoints(); }; setTimeout(2000, updatePoints); };