diff options
Diffstat (limited to 'demo/src/js/main.js')
-rw-r--r-- | demo/src/js/main.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/demo/src/js/main.js b/demo/src/js/main.js index 2a94195d..87c71756 100644 --- a/demo/src/js/main.js +++ b/demo/src/js/main.js @@ -1,12 +1,11 @@ // ========================================================================== // Plyr.io demo -// This code is purely for the plyr.io website +// This code is purely for the https://plyr.io website // Please see readme.md in the root or github.com/sampotts/plyr // ========================================================================== /*global Plyr*/ -// General functions (function() { /*document.body.addEventListener('ready', function(event) { console.log(event); @@ -186,15 +185,16 @@ })(); // Google analytics -// For demo site (http://[www.]plyr.io) only -if (document.domain.indexOf('plyr.io') > -1) { +// For demo site (https://plyr.io) only +if (window.location.host === 'plyr.io') { (function(i, s, o, g, r, a, m) { i.GoogleAnalyticsObject = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) - }, i[r].l = 1 * new Date(); - a = s.createElement(o), - m = s.getElementsByTagName(o)[0]; + }; + i[r].l = 1 * new Date(); + a = s.createElement(o); + m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) |