From 11ddbe89f398dde180ced350e311f364ffc806dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Mon, 15 Apr 2019 15:12:42 +0200 Subject: [PATCH] Changed icon, added CSS and improved code readability --- githubpoints-projects.js | 4 ++-- githubpoints.css | 13 +++++++++++++ icons/githubpoints-48.png | Bin 225 -> 5511 bytes manifest.json | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 githubpoints.css diff --git a/githubpoints-projects.js b/githubpoints-projects.js index 9763802..641cbbd 100644 --- a/githubpoints-projects.js +++ b/githubpoints-projects.js @@ -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+\)/, '' + points + ''); + link.innerHTML = link.text.replace(/^\(\d+\)/, '' + points + ''); } }; }; @@ -25,7 +25,7 @@ var updatePoints = function () { if (column_points.length > 0) { column_points[0].innerHTML = total; } else { - header.innerHTML = '' + total + '' + header.innerHTML; + header.innerHTML = '' + total + '' + header.innerHTML; } }; }; diff --git a/githubpoints.css b/githubpoints.css new file mode 100644 index 0000000..6c6b55e --- /dev/null +++ b/githubpoints.css @@ -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; +} diff --git a/icons/githubpoints-48.png b/icons/githubpoints-48.png index 90687de26d71e91b7c82565772a7df470ae277a6..3eecc7b8373b76700e6c1796b7582d22196875ae 100644 GIT binary patch literal 5511 zcmV;26?p22P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=QHavZy{hTpLYF9B0xSPl|H#NC0H?=MkBisF&Z zjbr=84zne8v$`5X4*!65`|tmE+~4@gy=9lBw$e-S{N$c{9K2}$`FWm$&-eHJN$*?y z{nK^#`9|bY`f+F3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VqbyWAPV%zYNB8YD1m-}`x4w4&*xfq2SUhnVF`#3H%37r&VcU?cFf(@l4hWl?d);( zyU;6gNG8HO4~gum?c@wtI9$bIt%A@JzRM^bz3?1Q@ED z4Hky(8e)8CH@`q&VTEq`nETO9dWBdpgMCb&XUO24YJ`L;(K){{a7> zy{D4^000SaNLh0L01m_e01m_fl`9S#00007bV*G`2jc_}4GKH5+vn#100TEkL_t(& z-tCxQNK2e0;(B{@guADeG_t)FQ)L7l=-M!mDxCidTy_etboX_u^-|w9B zBPfcZu!&_0Ho5QsJOB^C1MmPm01vo_LZDVH zf>uqUK_kH#gOZbef^9WwvHH+8=!eUn;AB8WkpS0@7omkE2rGcrUMKoSLRk%k(|Q>m zU8u}GK%L0}yEjJrul;}m-Hl3gSiE>)TU`6zppoKz=T6!&`_0q%G!q5@XjLS}Oq$$n z;?`a#t?>i_H0la)y=ezZ3xyDqsnhN*6*HRO?v0_f*O{A5Y_a-i!{&KM1?sD$C@v7B z9b2PH0vK<()>eB}W&`n*_r8%3j#_<;_XJ}PbPf7xzb{i1zW$R_V)dmxZBF*MlPf_0(K|J1JrIdgFdIv7VxJsKF$!qrOU-^u}Z;_W-pj5k5{wSSjcqU4Z?^c4*7Qcyh5k<=@NC zix?OS(0firW^WT~)g~Bq7h`}HgA&bpScg{1%h002ov JPDHLkV1h|-Ved+mEvHuIy!K@bZ41J}N$e^&*#q7kxbW`Aeg?)>n&l0$_8Su99dSC8zE$lUF`qPjCjs5V;OXk;vd$@?2>`o3Oi=&; diff --git a/manifest.json b/manifest.json index 2666fa6..b20bb13 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,8 @@ "content_scripts": [ { "matches": ["*://*.github.com/*/projects/*"], - "js": ["githubpoints-projects.js"] + "js": ["githubpoints-projects.js"], + "css": ["githubpoints.css"] } ]