commit 7cbf181da7530f1bf434eb054530002cc65e2782 Author: José Carlos Cuevas Date: Fri Apr 12 12:55:20 2019 +0200 Initial commit of not working extension diff --git a/githubpoints-projects.js b/githubpoints-projects.js new file mode 100644 index 0000000..778432e --- /dev/null +++ b/githubpoints-projects.js @@ -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+\)/, '' + points + ''); + } + }); + }; + var updatePoints = function () { + calculateIssuePoints(); + }; + setTimeout(2000, updatePoints); +}; diff --git a/icons/githubpoints-48.png b/icons/githubpoints-48.png new file mode 100644 index 0000000..90687de Binary files /dev/null and b/icons/githubpoints-48.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..60872f3 --- /dev/null +++ b/manifest.json @@ -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":["","tabs"], + + "content_security_policy": "script-src 'self'; object-src 'self'; font-src 'self';", + + "content_scripts": [ + { + "matches": ["*://*.github.com/*/projects/*"], + "js": ["githubpoints-projects.js"] + } + ] + +}