=== modified file 'slideshows/ubuntu/slides/link/twitter.js' --- slideshows/ubuntu/slides/link/twitter.js 2012-02-27 16:55:26 +0000 +++ slideshows/ubuntu/slides/link/twitter.js 2012-04-30 15:46:26 +0000 @@ -45,27 +45,27 @@ var userScreenName = innerData.from_user || innerData.user.screen_name; var linkHashTag = function(hashTag) { - return 'http://twitter.com/search?q='+escape('#'+hashTag); + return 'https://twitter.com/search?q='+encodeURIComponent('#'+hashTag); } var linkUser = function(userName) { - return 'http://twitter.com/'+escape(userName); + return 'https://twitter.com/'+encodeURIComponent(userName); } var linkUserID = function(userID) { - return 'http://twitter.com/account/redirect_by_id?id='+userID; + return 'https://twitter.com/account/redirect_by_id?id='+encodeURIComponent(userID); } var linkEntities = function(entities, text) { entityIndices = {}; $.each(entities.media || [], function(i, entry) { - var link = ''+escapeHTML(entry.display_url || entry.url)+''; + var link = ''+escapeHTML(entry.display_url || entry.url)+''; entityIndices[entry.indices[0]] = [entry.indices[1], link]; }); $.each(entities.urls || [], function(i, entry) { - var link = ''+escapeHTML(entry.display_url || entry.url)+''; + var link = ''+escapeHTML(entry.display_url || entry.url)+''; entityIndices[entry.indices[0]] = [entry.indices[1], link]; }); @@ -147,7 +147,7 @@ // request is tightly encapsulated because we might move that logic to a remote server - var QUERY_URL = 'http://api.twitter.com/1/lists/statuses.json'; + var QUERY_URL = 'https://api.twitter.com/1/lists/statuses.json'; var request = { 'owner_screen_name' : 'hello_ubuntu', 'slug' : 'installer-slideshow', @@ -156,7 +156,7 @@ 'per_page' : 25 } - //var QUERY_URL = 'http://search.twitter.com/search.json'; + //var QUERY_URL = 'https://search.twitter.com/search.json'; /*var request = { 'q' : 'from:ubuntu OR from:ubuntudev OR from:planetubuntu OR from:ubuntul10n OR from:ubuntucloud OR from:ubuntuone OR from:ubuntudesigners OR from:ubuntuunity OR from:canonical', 'lang' : 'all', @@ -342,7 +342,7 @@ // Twitter-post-status-link is a
to avoid being translated. We need to wrap it around an tag var statusText = $(linkContent).children('.twitter-post-status-text').text(); var link = $(''); - link.attr('href', 'http://twitter.com/home?status='+encodeURIComponent(statusText)); + link.attr('href', 'https://twitter.com/home?status='+encodeURIComponent(statusText)); link.insertBefore(linkContent); $(linkContent).appendTo(link); });