From: Marcel Werk Date: Sat, 26 Apr 2014 12:57:03 +0000 (+0200) Subject: Disable fetch for twitter and reddit when using SSL X-Git-Tag: 2.0.6~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3dac0af407d1e0121bda8ca81f29b3f87a456ca2;p=GitHub%2FWoltLab%2FWCF.git Disable fetch for twitter and reddit when using SSL --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 8015ebe36b..0a6416cb43 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2962,6 +2962,8 @@ WCF.Message.Share.Page = Class.extend({ * Fetches tweet count from Twitter. */ _fetchTwitter: function() { + if (window.location.protocol.match(/^https/)) return; + this._fetchCount('http://urls.api.twitter.com/1/urls/count.json?url={pageURL}', $.proxy(function(data) { if (data.count) { this._ui.twitter.children('span.badge').show().text(data.count); @@ -2973,6 +2975,8 @@ WCF.Message.Share.Page = Class.extend({ * Fetches cumulative vote sum from Reddit. */ _fetchReddit: function() { + if (window.location.protocol.match(/^https/)) return; + this._fetchCount('http://www.reddit.com/api/info.json?url={pageURL}', $.proxy(function(data) { if (data.data.children.length) { this._ui.reddit.children('span.badge').show().text(data.data.children[0].data.score);