diff options
Diffstat (limited to '.themes/classic/source')
| -rw-r--r-- | .themes/classic/source/_includes/article.html | 2 | ||||
| -rw-r--r-- | .themes/classic/source/_includes/head.html | 2 | ||||
| -rw-r--r-- | .themes/classic/source/javascripts/github.js | 12 | ||||
| -rw-r--r-- | .themes/classic/source/javascripts/pinboard.js | 4 | ||||
| -rw-r--r-- | .themes/classic/source/javascripts/twitter.js | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html index 9db07455..23f48844 100644 --- a/.themes/classic/source/_includes/article.html +++ b/.themes/classic/source/_includes/article.html @@ -8,7 +8,7 @@ {% unless page.meta == false %} <p class="meta"> {% include post/date.html %}{{ time }} - {% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %} + {% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %} | <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments</a> {% endif %} </p> diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index 0fdc4019..d7abd6fd 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -16,7 +16,7 @@ <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1"> - {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} <link rel="canonical" href="{{ canonical }}"> <link href="{{ root_url }}/favicon.png" rel="icon"> <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js index 678775a9..9e98b8c2 100644 --- a/.themes/classic/source/javascripts/github.js +++ b/.themes/classic/source/javascripts/github.js @@ -3,22 +3,22 @@ var github = (function(){ var i = 0, fragment = '', t = $(target)[0]; for(i = 0; i < repos.length; i++) { - fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>'; + fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>'; } t.innerHTML = fragment; } return { showRepos: function(options){ $.ajax({ - url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?" + url: "https://api.github.com/users/"+options.user+"/repos?callback=?" , type: 'jsonp' , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); } , success: function(data) { var repos = []; - if (!data || !data.repositories) { return; } - for (var i = 0; i < data.repositories.length; i++) { - if (options.skip_forks && data.repositories[i].fork) { continue; } - repos.push(data.repositories[i]); + if (!data || !data.data) { return; } + for (var i = 0; i < data.data.length; i++) { + if (options.skip_forks && data.data[i].fork) { continue; } + repos.push(data.data[i]); } repos.sort(function(a, b) { var aDate = new Date(a.pushed_at).valueOf(), diff --git a/.themes/classic/source/javascripts/pinboard.js b/.themes/classic/source/javascripts/pinboard.js index 52577e2c..a97df03d 100644 --- a/.themes/classic/source/javascripts/pinboard.js +++ b/.themes/classic/source/javascripts/pinboard.js @@ -44,7 +44,7 @@ function Pinboard_Linkroll() { if (it.t.length > 0) { for (var i = 0; i < it.t.length; i++) { var tag = it.t[i]; - str += " <a class=\"pin-tag\" href=\"http://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> "; + str += " <a class=\"pin-tag\" href=\"https://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> "; } } str += "</p></li>\n"; @@ -52,5 +52,5 @@ function Pinboard_Linkroll() { } } Pinboard_Linkroll.prototype = new Pinboard_Linkroll(); -pinboardNS_fetch_script("http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count); +pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count); diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index c9b7519d..3e2dd0d7 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -42,8 +42,8 @@ function prettyDate(time) { function linkifyTweet(text, url) { // Linkify urls, usernames, hashtags text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>') - .replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') - .replace(/(^|\W)#(\w+)/g, '$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>'); + .replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>') + .replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>'); // Use twitter's api to replace t.co shortened urls with expanded ones. for (var u in url) { @@ -62,7 +62,7 @@ function showTwitterFeed(tweets, twitter_user) { content = ''; for (var t in tweets) { - content += '<li>'+'<p>'+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; + content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; } timeline.innerHTML = content; } @@ -70,7 +70,7 @@ function showTwitterFeed(tweets, twitter_user) { function getTwitterFeed(user, count, replies) { count = parseInt(count, 10); $.ajax({ - url: "http://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" + url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" , type: 'jsonp' , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } , success: function(data) { showTwitterFeed(data.slice(0, count), user); } |
