diff --git a/analytics.js b/analytics.js deleted file mode 100644 index f1b05512..00000000 --- a/analytics.js +++ /dev/null @@ -1,28 +0,0 @@ -var _gaq = _gaq || []; -_gaq.push(['_setAccount', 'UA-8246384-4']); -_gaq.push(['_trackPageview']); - -function isAnalyticsEnabled() { - try { - return chrome.extension.getBackgroundPage().prefs.get("analyticsEnabled"); - } catch (ex) { - console.log(ex); - return true; - } -} - -// Prefs seems not available immediately -setTimeout(function() { - if (isAnalyticsEnabled()) { - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = 'https://ssl.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - setInterval(function() { - if (isAnalyticsEnabled()) { - _gaq.push(['_trackPageview']); - } - }, 1000 * 60 * 60 * 24); - } -}, 1000); diff --git a/manifest.json b/manifest.json index b41d8701..915fa98a 100644 --- a/manifest.json +++ b/manifest.json @@ -22,9 +22,8 @@ "http://userstyles.org/", "https://userstyles.org/" ], - "content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'", "background": { - "scripts": ["messaging.js", "storage-websql.js", "storage.js", "background.js", "analytics.js"] + "scripts": ["messaging.js", "storage-websql.js", "storage.js", "background.js"] }, "commands": { "openManage": {