From af789ae8ee0bdeda3e405d8ea83f8fa662343c66 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Nov 2014 07:28:27 -0500 Subject: [PATCH] feature(config) rm analytics --- HELP.md | 1 - html/config.html | 1 - json/config.json | 1 - lib/client.js | 2 -- lib/client/analytics.js | 20 -------------------- lib/client/listeners.js | 18 ------------------ 6 files changed, 43 deletions(-) delete mode 100644 lib/client/analytics.js diff --git a/HELP.md b/HELP.md index 1557af8f..da51f946 100644 --- a/HELP.md +++ b/HELP.md @@ -200,7 +200,6 @@ Here is description of options: "auth" : false, /* enable http authentication */ "username" : "root", /* username for authentication */ "password" : "toor", /* password hash in sha-1 for authentication*/ - "analytics" : true, /* google analytics support */ "diff" : true, /* when save - send patch, not whole file */ "zip" : true, /* zip text before send / unzip before save */ "notifications" : false, /* show notifications when tab is not active*/ diff --git a/html/config.html b/html/config.html index 207e610d..c84bc35b 100644 --- a/html/config.html +++ b/html/config.html @@ -2,7 +2,6 @@
  • -
  • diff --git a/json/config.json b/json/config.json index a0c8bbad..7189e7ef 100644 --- a/json/config.json +++ b/json/config.json @@ -2,7 +2,6 @@ "auth": false, "username": "root", "password": "2b64f2e3f9fee1942af9ff60d40aa5a719db33b8ba8dd4864bb4f11e25ca2bee00907de32a59429602336cac832c8f2eeff5177cc14c864dd116c8bf6ca5d9a9", - "analytics": true, "diff": true, "zip" : true, "notifications": false, diff --git a/lib/client.js b/lib/client.js index c9da7ff8..c5603288 100644 --- a/lib/client.js +++ b/lib/client.js @@ -252,8 +252,6 @@ var Util, DOM, CloudFunc, join; dirPath = DOM.getCurrentDirPath(), Listeners = CloudCmd.Listeners; Listeners.init(); - /* загружаем Google Analytics */ - Listeners.analytics(); Listeners.setOnPanel(LEFT); Listeners.setOnPanel(RIGHT); diff --git a/lib/client/analytics.js b/lib/client/analytics.js deleted file mode 100644 index 346c7cb3..00000000 --- a/lib/client/analytics.js +++ /dev/null @@ -1,20 +0,0 @@ -var DOM, ga, GoogleAnalyticsObject; - -(function(DOM) { - 'use strict'; - - GoogleAnalyticsObject = 'ga'; - - ga = { - l: new Date().getTime(), - q: [['create', 'UA-33536569-2', 'auto'], ['send', 'pageview']] - }; - - DOM.Events.addError(function(msg, url, line) { - ga.push(['_trackEvent', 'JS Error', msg, - navigator.userAgent + ' -> ' + url + ' : ' + line]); - }); - - DOM.load.js('//www.google-analytics.com/analytics.js'); - -})(DOM); diff --git a/lib/client/listeners.js b/lib/client/listeners.js index 055dfbeb..c03d88bd 100644 --- a/lib/client/listeners.js +++ b/lib/client/listeners.js @@ -19,24 +19,6 @@ var Util, DOM, CloudFunc, CloudCmd; 'touchstart' : Util.exec.with(execIfNotUL, onTouch) }; - this.analytics = function() { - Files.get('config', function(error, config) { - var analytics = config.analytics, - online = config.online; - - if (analytics && online) { - Events.addOnce('mousemove', function() { - var FIVE_SECONDS = 5000, - url = CloudCmd.LIBDIRCLIENT + 'analytics.js'; - - setTimeout(function() { - DOM.load.js(url); - }, FIVE_SECONDS); - }); - } - }); - }; - this.init = function () { appStorage(); contextMenu();