From 30898131997d7b8757085e14d20415ab2f89055d Mon Sep 17 00:00:00 2001 From: Alex Bardanov Date: Sun, 20 Jul 2014 20:54:05 +0300 Subject: [PATCH] modified github stats layout, #30 --- extension/services/mutation.js | 6 ++++++ extension/styles/main.css | 4 ++++ extension/templates/downloads.html | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/extension/services/mutation.js b/extension/services/mutation.js index 7b9b18e..757cfcc 100644 --- a/extension/services/mutation.js +++ b/extension/services/mutation.js @@ -117,6 +117,12 @@ define(function (require, exports, module){ //hide daily downloads counter for extensions without daily downloads if (!dailyDownloads) { $t.find('.ext-daily').hide(); } + //hide stars counter for extensions without stars on GitHub + if (!stars) { $t.find('.ext-stars').hide(); } + + //hide forks counter for extensions without forks on GitHub + if (!forks) { $t.find('.ext-forks').hide(); } + if (registryEntry.badge && registryEntry.badge.length > 0){ badgeHolder = $('
'); $t.find('.ext-info').append(badgeHolder); diff --git a/extension/styles/main.css b/extension/styles/main.css index e7c0a4a..5832388 100644 --- a/extension/styles/main.css +++ b/extension/styles/main.css @@ -47,3 +47,7 @@ span.ext-daily{ .fa{ font-size: 14px; } + +.ext-stars, .ext-forks{ + margin-right: 2px; +} diff --git a/extension/templates/downloads.html b/extension/templates/downloads.html index ff807c3..fcd1efb 100644 --- a/extension/templates/downloads.html +++ b/extension/templates/downloads.html @@ -4,6 +4,10 @@ ${downloads} (+${daily}) - ${stars} - ${forks} + + ${stars} + + + ${forks} +