Major improvements and fixes
[snf-cloudcms] / cloudcms / static / cloudcms / js / twitter / jquery.twitter.js
index cb61270..d2bcf3a 100644 (file)
@@ -14,12 +14,12 @@ var linkify = linkify || function() {};
   var
   mention = function( str ) {
     return str.replace("/[@]+[A-Za-z0-9-_]+/ig", function( username ) {
-      return username.link("http://twitter.com/"+ username.replace("@","") );
+      return username.link("https://twitter.com/"+ username.replace("@","") );
     });
   },
   hashtags = function( str ) {
     return str.replace("/[#]+[A-Za-z0-9-_]+/ig", function( tag ) {
-      return tag.link("http://search.twitter.com/search?q="+tag.replace("#","%23"));
+      return tag.link("https://search.twitter.com/search?q="+tag.replace("#","%23"));
     });
   };
 
@@ -67,7 +67,7 @@ var linkify = linkify || function() {};
 
 
     // Call Twitter JSONP
-    $.getJSON("http://search.twitter.com/search.json?callback=?", query, function(tweets){
+    $.getJSON("https://search.twitter.com/search.json?callback=?", query, function(tweets){
       callback(tweets, query, exclusionsExp);
     });
   };
@@ -129,7 +129,7 @@ var linkify = linkify || function() {};
             // Make the avatar, and append it to the $tweet
             if ( query.avatar === true ) {
               $tweet.append($("<a/>", {
-                href: "http://twitter.com/" + tweet.from_user,
+                href: "https://twitter.com/" + tweet.from_user,
                 html: "<img src='" + tweet.profile_image_url + "'/>"
               }));
             }
@@ -137,7 +137,7 @@ var linkify = linkify || function() {};
             // Make the tweet text, and append it to the $tweet, then to the parent
             $tweet.append($("<span>", {
               "class": "content",
-              html: "<a href='http://twitter.com/" + tweet.from_user + "'>@" + tweet.from_user + "</a>: " + mention(hashtags(linkify(tweet.text)))
+              html: "<a href='https://twitter.com/" + tweet.from_user + "'>@" + tweet.from_user + "</a>: " + mention(hashtags(linkify(tweet.text)))
             }))
             // Append tweet to the $tweets ul
             .appendTo($tweets);