From 4b5ffb725a7ca97a24e62f42d47c502a968d3103 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 1 Oct 2012 07:26:26 -0500 Subject: [PATCH] Using https rather than protocol relative urls --- .../classic/source/javascripts/group/octopress.js | 12 ++++++------ .themes/classic/source/javascripts/group/pinboard.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.themes/classic/source/javascripts/group/octopress.js b/.themes/classic/source/javascripts/group/octopress.js index 4eecb20..9b3e559 100644 --- a/.themes/classic/source/javascripts/group/octopress.js +++ b/.themes/classic/source/javascripts/group/octopress.js @@ -165,9 +165,9 @@ var octopress = (function(){ function linkifyTweet(text, url) { // Linkify urls, usernames, hashtags - text = text.replace(/(https?:)(\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$3') - .replace(/(^|\W)@(\w+)/g, '$1@$2') - .replace(/(^|\W)#(\w+)/g, '$1#$2'); + text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2') + .replace(/(^|\W)@(\w+)/g, '$1@$2') + .replace(/(^|\W)#(\w+)/g, '$1#$2'); // Use twitter's api to replace t.co shortened urls with expanded ones. for (var u in url) { @@ -186,7 +186,7 @@ var octopress = (function(){ content = ''; for (var t in tweets) { - content += '
  • '+'

    '+''+octopress.prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
    '), tweets[t].entities.urls)+'

    '+'
  • '; + content += '
  • '+'

    '+''+octopress.prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
    '), tweets[t].entities.urls)+'

    '+'
  • '; } timeline.innerHTML = content; } @@ -199,7 +199,7 @@ var octopress = (function(){ var count = parseInt(target.attr('data-count'), 10); var replies = target.attr('data-replies') == 'true'; $.ajax({ - url: "//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=?" , dataType: 'jsonp' , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } , success: function(data) { render(data.slice(0, count), user); } @@ -235,7 +235,7 @@ var octopress = (function(){ var count = parseInt(target.attr('data-count')) var skip_forks = target.attr('data-skip') == 'true'; $.ajax({ - url: "//api.github.com/users/"+user+"/repos?callback=?" + url: "https://api.github.com/users/"+user+"/repos?callback=?" , dataType: 'jsonp' , error: function (err) { target.find('.loading').addClass('error').text("Error loading feed"); } , success: function(data) { diff --git a/.themes/classic/source/javascripts/group/pinboard.js b/.themes/classic/source/javascripts/group/pinboard.js index 77715a7..552ec86 100644 --- a/.themes/classic/source/javascripts/group/pinboard.js +++ b/.themes/classic/source/javascripts/group/pinboard.js @@ -50,7 +50,7 @@ var pinboard = (function(){ return { getFeed: function(options) { this.element = options.target; - fetch("//feeds.pinboard.in/json/v1/u:"+options.user+"/?cb=pinboard.render\&count="+options.count); + fetch("https://feeds.pinboard.in/json/v1/u:"+options.user+"/?cb=pinboard.render\&count="+options.count); }, render: function(data) {