From 3dac0af407d1e0121bda8ca81f29b3f87a456ca2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 26 Apr 2014 14:57:03 +0200 Subject: [PATCH] Disable fetch for twitter and reddit when using SSL --- wcfsetup/install/files/js/WCF.Message.js | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.20.1