1
1
'use strict' ;
2
2
3
- // Google Analytics
4
- var googleAnalyticsService = analytics . getService ( 'ice_cream_app' ) ;
5
- var googleAnalytics = googleAnalyticsService . getTracker ( atob ( "VUEtNTI4MjA5MjAtMQ==" ) ) ;
6
- var googleAnalyticsConfig = false ;
7
- googleAnalyticsService . getConfig ( ) . addCallback ( function ( config ) {
8
- googleAnalyticsConfig = config ;
9
- } ) ;
10
-
11
3
$ ( document ) . ready ( function ( ) {
12
4
// translate to user-selected language
13
5
localize ( ) ;
@@ -54,11 +46,6 @@ $(document).ready(function () {
54
46
// it would seem the webgl "enabling" through advanced settings will be ignored in the future
55
47
// and webgl will be supported if gpu supports it by default (canary 40.0.2175.0), keep an eye on this one
56
48
var canvas = document . createElement ( 'canvas' ) ;
57
- if ( window . WebGLRenderingContext && ( canvas . getContext ( 'webgl' ) || canvas . getContext ( 'experimental-webgl' ) ) ) {
58
- googleAnalytics . sendEvent ( 'Capability' , 'WebGL' , 'true' ) ;
59
- } else {
60
- googleAnalytics . sendEvent ( 'Capability' , 'WebGL' , 'false' ) ;
61
- }
62
49
63
50
// log library versions in console to make version tracking easier
64
51
console . log ( 'Libraries: jQuery - ' + $ . fn . jquery + ', d3 - ' + d3 . version + ', three.js - ' + THREE . REVISION ) ;
@@ -194,8 +181,6 @@ $(document).ready(function () {
194
181
el . after ( '<div id="options-window"></div>' ) ;
195
182
196
183
$ ( 'div#options-window' ) . load ( './tabs/options.html' , function ( ) {
197
- googleAnalytics . sendAppView ( 'Options' ) ;
198
-
199
184
// translate to user-selected language
200
185
localize ( ) ;
201
186
@@ -208,21 +193,17 @@ $(document).ready(function () {
208
193
209
194
$ ( 'div.notifications input' ) . change ( function ( ) {
210
195
var check = $ ( this ) . is ( ':checked' ) ;
211
- googleAnalytics . sendEvent ( 'Settings' , 'Notifications' , check ) ;
212
196
213
197
chrome . storage . local . set ( { 'update_notify' : check } ) ;
214
198
} ) ;
215
199
216
200
// if tracking is enabled, check the statistics checkbox
217
- if ( googleAnalyticsConfig . isTrackingPermitted ( ) ) {
218
- $ ( 'div.statistics input' ) . prop ( 'checked' , true ) ;
219
- }
220
-
221
- $ ( 'div.statistics input' ) . change ( function ( ) {
222
- var check = $ ( this ) . is ( ':checked' ) ;
223
- googleAnalytics . sendEvent ( 'Settings' , 'GoogleAnalytics' , check ) ;
224
- googleAnalyticsConfig . setTrackingPermitted ( check ) ;
225
- } ) ;
201
+ //if (googleAnalyticsConfig.isTrackingPermitted()) {
202
+ // $('div.statistics input').prop('checked', false);
203
+ //}
204
+ //$('div.statistics input').change(function () {
205
+ // var check = $(this).is(':checked');
206
+ //});
226
207
227
208
function close_and_cleanup ( e ) {
228
209
if ( e . type == 'click' && ! $ . contains ( $ ( 'div#options-window' ) [ 0 ] , e . target ) || e . type == 'keyup' && e . keyCode == 27 ) {
@@ -357,13 +338,6 @@ $(document).ready(function () {
357
338
} ) ;
358
339
} ) ;
359
340
360
- function catch_startup_time ( startTime ) {
361
- var endTime = new Date ( ) . getTime ( ) ,
362
- timeSpent = endTime - startTime ;
363
-
364
- googleAnalytics . sendTiming ( 'Load Times' , 'Application Startup' , timeSpent ) ;
365
- }
366
-
367
341
function microtime ( ) {
368
342
var now = new Date ( ) . getTime ( ) / 1000 ;
369
343
@@ -416,4 +390,4 @@ function updateActivatedTab() {
416
390
var activeTab = $ ( '#tabs > ul li.active' ) ;
417
391
activeTab . removeClass ( 'active' ) ;
418
392
$ ( 'a' , activeTab ) . trigger ( 'click' ) ;
419
- }
393
+ }
0 commit comments