Skip to content

Commit

Permalink
Merge pull request #6 from jjgod/master
Browse files Browse the repository at this point in the history
Fix loading moment.min.js from non-root path
  • Loading branch information
tommy351 committed Jan 21, 2013
2 parents 52d86ef + f20393b commit 323e61a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion layout/_widget/twitter.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script type="text/javascript">
var twitter_stream = ['<%= theme.twitter.username %>', <%= theme.twitter.tweet_count %>, <%= theme.twitter.show_replies %>];
var moment_js_path = '<%- config.root %>js/moment.min.js';
</script>
<script src="<%- config.root %>js/twitter.js"></script>
<% } %>
<% } %>
4 changes: 2 additions & 2 deletions source/js/twitter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function($){
$.getScript('/js/moment.min.js', function(){
$.getScript(moment_js_path, function(){
var url = 'https://api.twitter.com/1/statuses/user_timeline/' + twitter_stream[0] + '.json?count=' + twitter_stream[1] + '&exclude_replies=' + (twitter_stream[2] ? 0 : 1) + '&trim_user=true&callback=?';

var linkify = function(text){
Expand All @@ -22,4 +22,4 @@
$('#tweets').html(result);
});
});
})(jQuery);
})(jQuery);

0 comments on commit 323e61a

Please sign in to comment.