From a45f822fdb68f6a63e0e9460dc9d75ac46c13b08 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 9 Mar 2015 15:56:34 -0700 Subject: [PATCH] Fixed: piwik loading when accessing Sonarr via HTTPS --- src/UI/Shared/piwikCheck.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/UI/Shared/piwikCheck.js b/src/UI/Shared/piwikCheck.js index e69de29bb..0146d36b5 100644 --- a/src/UI/Shared/piwikCheck.js +++ b/src/UI/Shared/piwikCheck.js @@ -0,0 +1,12 @@ +'use strict'; + +if(window.NzbDrone.Analytics) { + var d = document; + var g = d.createElement('script'); + var s = d.getElementsByTagName('script')[0]; + g.type = 'text/javascript'; + g.async = true; + g.defer = true; + g.src = '//piwik.sonarr.tv/piwik.js'; + s.parentNode.insertBefore(g, s); +}