1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 22:01:03 +01:00

Fix issue where https is not honoured when loading disqus api

Summary: Currently if disqus is used and a phame post is loaded over ssl, the disqus api is not loaded over https. This fixes that by honouring the protocol being used by the html document.

Test Plan: Open a phame post over https

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6311
This commit is contained in:
Cam Spiers 2013-06-25 16:32:51 -07:00 committed by epriestley
parent 9e82c01a8a
commit 97dc484854

View file

@ -220,7 +220,7 @@ final class PhamePostView extends AphrontView {
' var dsq = document.createElement("script");'.
' dsq.type = "text/javascript";'.
' dsq.async = true;'.
' dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'.
' dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";'.
'(document.getElementsByTagName("head")[0] ||'.
' document.getElementsByTagName("body")[0]).appendChild(dsq);'.
'})();',