summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--index.html6
-rw-r--r--js/main.js20
3 files changed, 17 insertions, 12 deletions
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 @@
<html lang=en-us>
<head>
<meta charset=UTF-8>
- <title>Githubber: Scorch</title>
+ <title>Githunt</title>
<link rel=stylesheet href=css/main.css>
@@ -28,8 +28,8 @@
<div class="top-header">
<div class="brand">
- <h1>Github</h1>
- <p>Hunt the repositories before they get even more popular</p>
+ <h1>Githunt</h1>
+ <p>Find what people are building with the technologies of your like</p>
</div>
<div class="top-nav">
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 = '<div class="content-batch"><h1 class="date-head" data-date="' + lowerDate + '">' + humanDate + ' - ' + formattedLower + ' &ndash; ' + formattedUpper + '</h1>' + html + '<div class="clearfix"></div></div></div>';
+
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