diff --git a/extension/locale/en-US.js b/extension/locale/en-US.js index 2e934df..09c4f3d 100644 --- a/extension/locale/en-US.js +++ b/extension/locale/en-US.js @@ -15,8 +15,10 @@ define(function (require, exports, module){ trending: 'Trending', //0.3.0 name: 'Name', daily: 'downloads yesterday', //0.3.0 + stars: 'Stars', //0.4.0 + forks: 'Forks', //0.4.0 - /*BADGES*/ + /*BADGES - 0.3.2*/ badgeAdobe: 'Adobe', badgeAdobeTitle: 'Extension from Adobe', diff --git a/extension/services/mutation.js b/extension/services/mutation.js index 757cfcc..1538ce3 100644 --- a/extension/services/mutation.js +++ b/extension/services/mutation.js @@ -13,7 +13,9 @@ define(function (require, exports, module){ downloads: locale.get('downloads'), update: locale.get('update'), trending: locale.get('trending'), - name: locale.get('name') + name: locale.get('name'), + stars: locale.get('stars'), + forks: locale.get('forks') }); function init(){ @@ -135,6 +137,8 @@ define(function (require, exports, module){ $t.attr('data-extension-loads', totalDownloads); $t.attr('data-extension-yesterday', dailyDownloads? dailyDownloads : 0); + $t.attr('data-extension-stars', stars); + $t.attr('data-extension-forks', forks); }); } @@ -254,6 +258,16 @@ define(function (require, exports, module){ return elements = _.sortBy(elements, function(el){ return -parseInt($(el).attr('data-extension-yesterday')); }); + }, + 'stars' : function(elements){ + return elements = _.sortBy(elements, function(el){ + return -parseInt($(el).attr('data-extension-stars')); + }); + }, + 'forks' : function(elements){ + return elements = _.sortBy(elements, function(el){ + return -parseInt($(el).attr('data-extension-forks')); + }); } } diff --git a/extension/templates/sortButton.html b/extension/templates/sortButton.html index 5a00b06..f6a7396 100644 --- a/extension/templates/sortButton.html +++ b/extension/templates/sortButton.html @@ -2,7 +2,9 @@ + +