Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Jesse Bickel3f42f8bf671a
diff --git a/config.js b/config.js
index 90bbd64105..1bb3d1563f 100644
--- a/config.js
+++ b/config.js
@@ -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
};
diff --git a/index.html b/index.html
index 93681fc6df..facee3d0e4 100644
--- a/index.html
+++ b/index.html
@@ -11,11 +11,9 @@
<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="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 -->
@@ -224,5 +222,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>