From 41dd665551e2b9c4586a984b3d33d3b09eabb9d5 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 25 Mar 2016 16:52:54 +0400 Subject: Add gitignore --- .gitignore | 3 +++ index.html | 6 +++--- js/main.js | 20 +++++++++++--------- 3 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f7f900 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Thumbs.db +.DS_Store +.idea diff --git a/index.html b/index.html index 4923a4d..ad5722f 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - Githubber: Scorch + Githunt @@ -28,8 +28,8 @@
-

Github

-

Hunt the repositories before they get even more popular

+

Githunt

+

Find what people are building with the technologies of your like

diff --git a/js/main.js b/js/main.js index b977ff2..5d5ffdc 100644 --- a/js/main.js +++ b/js/main.js @@ -36,7 +36,7 @@ function FilterStorage() { storage.setItem(name, $input.val()); }); - } + }; /** * Retrieves the values for the provided selector from localstorage @@ -55,12 +55,12 @@ function FilterStorage() { $input.val(value); } }); - } + }; return { /** * Persist the fields matching the provided selector to local storage - * @param fields + * @param selector */ persistFilters: function (selector) { persistFilters(selector); @@ -68,12 +68,12 @@ function FilterStorage() { /** * Populates the filters using the values stored in the localstorage - * @param fieldNames + * @param selector */ populateFilters: function (selector) { return populateFilters(selector); } - } + }; } /** @@ -88,7 +88,7 @@ function HubTab() { mainContainer= '.main-content', // Main container div dateHead = '.date-head', // Heading item for the batch of repositories dateAttribute = 'date', // Date attribute on the date head of batch - token = '6d36200a868dab6bab6ad74123ae8d705f0f5691', // API token to increase the rate limit + token = 'be604a0cd14b81bf3523a1a420cbad0a4d3eccda', // API token. Don't grin, it's a dummy one ¯\_(ツ)_/¯ languageFilter = '#language', // Filter for repositories language dateFilter = '#date-jump', // Date jump filter i.e. weekly, monthly or yearly reposApiUrl = 'https://api.github.com/search/repositories'; // URL for the repos @@ -130,7 +130,9 @@ function HubTab() { var humanDate = moment(lowerDate).fromNow(), formattedLower = moment(lowerDate).format('ll'), formattedUpper = moment(upperDate).format('ll'); + var finalHtml = '

' + humanDate + ' - ' + formattedLower + ' – ' + formattedUpper + '

' + html + '
'; + return finalHtml; } @@ -154,7 +156,7 @@ function HubTab() { } return dateRange; - } + }; /** * Gets the filters to be passed to API @@ -175,7 +177,7 @@ function HubTab() { queryParams: '?sort=stars&order=desc&q=' + langCondition + 'created:"' + dateRange.lower + ' .. ' + dateRange.upper + '"&access_token=' + token, dateRange: dateRange }; - } + }; /** * Fetches the trending repositories based upon the filters applied @@ -206,7 +208,7 @@ function HubTab() { $('.loading-more').addClass('hide'); } }); - } + }; /** * Perform all the UI bindings -- cgit v1.3