Changed icon, added CSS and improved code readability

master
José Carlos Cuevas 5 years ago
parent a02de0caf4
commit 11ddbe89f3

@ -5,7 +5,7 @@ var calculateIssuePoints = function () {
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" style="background-color: #0366d6; color: #fff; padding: 0.1rem;">' + points + '</span>');
link.innerHTML = link.text.replace(/^\(\d+\)/, '<span class="issue-points">' + points + '</span>');
}
};
};
@ -25,7 +25,7 @@ var updatePoints = function () {
if (column_points.length > 0) {
column_points[0].innerHTML = total;
} else {
header.innerHTML = '<span class="column-points" style="background-color: #0366d6; color: #fff; padding: 0.1rem;">' + total + '</span>' + header.innerHTML;
header.innerHTML = '<span class="column-points">' + total + '</span>' + header.innerHTML;
}
};
};

@ -0,0 +1,13 @@
.issue-points {
background-color: #0366d6;
color: #fff;
border-radius: 20px;
padding: 2px 5px;
}
.column-points {
background-color: #0366d6;
color: #fff;
border-radius: 20px;
padding: 2px 5px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 5.4 KiB

@ -15,7 +15,8 @@
"content_scripts": [
{
"matches": ["*://*.github.com/*/projects/*"],
"js": ["githubpoints-projects.js"]
"js": ["githubpoints-projects.js"],
"css": ["githubpoints.css"]
}
]

Loading…
Cancel
Save