From f716903a304fb4f99e41a4b98f9da82654b7fc79 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Sat, 27 Sep 2014 12:46:23 -0700 Subject: [PATCH] minor cleanup --- src/UI/Shared/NzbDroneController.js | 2 +- src/UI/piwik.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/UI/Shared/NzbDroneController.js b/src/UI/Shared/NzbDroneController.js index f0d52a9ba..c4584e3c7 100644 --- a/src/UI/Shared/NzbDroneController.js +++ b/src/UI/Shared/NzbDroneController.js @@ -26,7 +26,7 @@ define( document.title = title + ' - nzbdrone'; } - if(window.Piwik){ + if(window.NzbDrone.Analytics && window.Piwik){ try { var piwik = window.Piwik.getTracker('http://piwik.nzbdrone.com/piwik.php', 1); piwik.setReferrerUrl(''); diff --git a/src/UI/piwik.js b/src/UI/piwik.js index f56b4af31..782ef13c4 100644 --- a/src/UI/piwik.js +++ b/src/UI/piwik.js @@ -1,6 +1,4 @@ 'use strict'; - -(function () { if(window.NzbDrone.Analytics) { var d = document; var g = d.createElement('script'); @@ -10,5 +8,4 @@ if(window.NzbDrone.Analytics) { g.defer = true; g.src = 'http://piwik.nzbdrone.com/piwik.js'; s.parentNode.insertBefore(g, s); -} -})(); \ No newline at end of file +} \ No newline at end of file