Initial commit of not working extension

This commit is contained in:
José Carlos Cuevas 2019-04-12 12:55:20 +02:00
commit 7cbf181da7
3 changed files with 39 additions and 0 deletions

15
githubpoints-projects.js Normal file
View file

@ -0,0 +1,15 @@
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+\)/, '<span class="issue-points" style="background-color: #eef;">' + points + '</span>');
}
});
};
var updatePoints = function () {
calculateIssuePoints();
};
setTimeout(2000, updatePoints);
};

BIN
icons/githubpoints-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

24
manifest.json Normal file
View file

@ -0,0 +1,24 @@
{
"manifest_version": 2,
"name": "GithubPoints",
"version": "1.0",
"description": "Adds points and summary to the Github Project page",
"icons": {
"48": "icons/githubpoints-48.png"
},
"permissions":["<all_urls>","tabs"],
"content_security_policy": "script-src 'self'; object-src 'self'; font-src 'self';",
"content_scripts": [
{
"matches": ["*://*.github.com/*/projects/*"],
"js": ["githubpoints-projects.js"]
}
]
}