Only load 3rd party JavaScript when config.enableThirdPartyRequests is true.

This commit is contained in:
Jesse Bickel 2015-12-04 13:03:10 -06:00 committed by Boris Grozev
parent 98f0de258b
commit 46a5c909c8
2 changed files with 16 additions and 2 deletions

View File

@ -69,4 +69,5 @@ var config = {
/*noticeMessage: 'Service update is scheduled for 16th March 2015. ' +
'During that time service will not be available. ' +
'Apologise for inconvenience.'*/
enableThirdPartyRequests: true
};

View File

@ -11,12 +11,10 @@
<meta itemprop="image" content="/images/jitsilogo.png?v=1"/>
<link rel="stylesheet" href="css/all.css"/>
<script>console.log("(TIME) index.html loaded:\t", window.performance.now());</script>
<script src="https://api.callstats.io/static/callstats.min.js"></script>
<script src="config.js?v=15"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
<script src="interface_config.js?v=6"></script>
<script src="lib-jitsi-meet.js?v=139"></script>
<script src="libs/app.bundle.min.js?v=139"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<!--
Link used for inline installation of chrome desktop streaming extension,
is updated automatically from the code with the value defined in config.js -->
@ -225,5 +223,20 @@
<a id="feedbackButton" data-container="body" data-toggle="popover" data-placement="right" data-i18n="[data-content]feedback"><i class="fa fa-heart"></i></a>
</div>
</div>
<script type="text/javascript">
if (config.enableThirdPartyRequests === true)
{
[
'https://api.callstats.io/static/callstats.min.js',
'analytics.js?v=1'
].forEach(function(extSrc)
{
var extScript = document.createElement('script');
extScript.src = extSrc;
extScript.async = false;
document.head.appendChild(extScript);
});
}
</script>
</body>
</html>