Browse files

Revert "Normal JS, no more coalescing"

This reverts commit 944bf78.
  • Loading branch information...
1 parent 944bf78 commit 745c9e7a3154635a7b44a9bc1975c712d87282f8 Will White committed Nov 1, 2011
View
0 js/backbone.js → _includes/js/backbone.js
File renamed without changes.
View
0 js/jquery-1.6.4.min.js → _includes/js/jquery-1.6.4.min.js
File renamed without changes.
View
0 js/underscore.js → _includes/js/underscore.js
File renamed without changes.
View
4 _layouts/default.html
@@ -8,9 +8,7 @@
<!--[if IE]><link rel='stylesheet' href='{{base}}/site-ie.css' type='text/css'/><![endif]-->
<link rel='shortcut icon' href='{{base}}/images/favicon.ico' type='image/x-icon' />
<link href='http://fonts.googleapis.com/css?family=Jockey+One' rel='stylesheet' type='text/css'>
- <script src='{{base}}/js/underscore.js' type='text/javascript'></script>
- <script src='{{base}}/js/jquery-1.6.4.min.js' type='text/javascript'></script>
- <script src='{{base}}/js/site.js' type='text/javascript'></script>
+ <script src='{{base}}/site.js' type='text/javascript'></script>
</head>
<body>
<div class='limiter'>
View
68 js/site.js → site.js
@@ -1,3 +1,9 @@
+---
+---
+;{% include js/jquery-1.6.4.min.js %}
+;{% include js/underscore.js %}
+;
+
(function(context) {
var longneck = {};
@@ -17,22 +23,21 @@ longneck.githubWatcherProject = function(resp) {
var repo = _(resp.data)
.chain()
.shuffle()
- .detect(function(r) {
- return r.language === '{{site.github_language}}';
- })
+ .detect(function(r) { return r.language === '{{site.github_lanaguage}}' })
.value();
if (!repo) {
getProjects(shuffled[i++]);
} else {
- var template = "" +
- "<a target='_blank' href='http://github.com/<%=owner.login%>'><%=owner.login%></a>" +
- " / " +
- "<a target='_blank' href='<%=html_url%>'>" +
- "<span class='title'><strong><%=name%></strong></span>" +
- "</a>" +
- "<span class='title'> <%=description%></span>" +
- "";
+ var template =
+ ""
+ + "<a target='_blank' href='http://github.com/<%=owner.login%>'><%=owner.login%></a>"
+ + " / "
+ + "<a target='_blank' href='<%=html_url%>'>"
+ + "<span class='title'><strong><%=name%></strong></span>"
+ + "</a>"
+ + "<span class='title'> <%=description%></span>"
+ + "";
var t = _(template).template(repo);
watcherProject.append(t).addClass('loaded');
}
@@ -54,13 +59,11 @@ longneck.githubWatchers = function() {
if (!resp.data.length) return;
longneck.githubWatcherProject(resp);
var template =
- "<a class='github-user' target='_blank' href='http://github.com/<%=login%>'>" +
- "<span style='background-image:url(<%=avatar_url%>)' class='thumb' /></span>" +
- "</a>";
+ "<a class='github-user' target='_blank' href='http://github.com/<%=login%>'>"
+ + "<span style='background-image:url(<%=avatar_url%>)' class='thumb' /></span>"
+ + "</a>";
var t = _(resp.data)
- .map(function(i) {
- return _(template).template(i);
- })
+ .map(function(i) { return _(template).template(i); })
.join('');
watchers.append(t);
}
@@ -73,12 +76,9 @@ longneck.setup = function() {
var tweets = $('.tweets');
$('.watch').hover(
- function() {
- $('.watch-docs').addClass('active');
- },
- function() {
- $('.watch-docs').removeClass('active');
- });
+ function() { $('.watch-docs').addClass('active') },
+ function() { $('.watch-docs').removeClass('active') }
+ )
$.ajax({
url: 'http://search.twitter.com/search.json',
@@ -87,23 +87,21 @@ longneck.setup = function() {
success: function(resp) {
if (!resp.results.length) return;
var template =
- "<a target='_blank' href='http://twitter.com/<%=from_user%>/status/<%=id_str%>' class='tweet'>" +
- "<span class='thumb' style='background-image:url(<%=profile_image_url%>)'></span>" +
- "<span class='popup'>" +
- "<span class='title'>@<%=from_user%></span>" +
- "<small><%=text%></small>" +
- "</span>" +
- "<span class='caret'></span>" +
- "</a>";
+ "<a target='_blank' href='http://twitter.com/<%=from_user%>/status/<%=id_str%>' class='tweet'>"
+ + "<span class='thumb' style='background-image:url(<%=profile_image_url%>)'></span>"
+ + "<span class='popup'>"
+ + "<span class='title'>@<%=from_user%></span>"
+ + "<small><%=text%></small>"
+ + "</span>"
+ + "<span class='caret'></span>"
+ + "</a>";
var t = _(resp.results.slice(0,30))
- .map(function(i) {
- return _(template).template(i);
- })
+ .map(function(i) { return _(template).template(i); })
.join('');
tweets.append(t).addClass('loaded');
}
});
-};
+}
$(longneck.setup);
context.longneck = longneck;

0 comments on commit 745c9e7

Please sign in to comment.