From 2b3d2a8e663a5393d644b773067bd5173fcd9de8 Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Sun, 4 Dec 2016 13:48:14 +0530 Subject: [PATCH] eslint fixes. --- src/analytics.js | 7 +++++++ src/script.js | 1 + 2 files changed, 8 insertions(+) diff --git a/src/analytics.js b/src/analytics.js index 5bfefcd..3d7b029 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -1,3 +1,5 @@ +/* global ga */ +// eslint-disable-next-line max-params window.trackEvent = function (category, action, label, value) { if (window.ga) { ga('send', 'event', category, action, label, value); @@ -7,6 +9,8 @@ window.trackEvent = function (category, action, label, value) { // if online, load after sometime if (navigator.onLine) { setTimeout(function() { + + /* eslint-disable */ (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r; i[r]=i[r]||function(){ @@ -18,5 +22,8 @@ if (navigator.onLine) { // required for chrome extension protocol ga('set', 'checkProtocolTask', function(){ /* nothing */ }); ga('send', 'pageview'); + + /* eslint-enable */ + }, 0); } \ No newline at end of file diff --git a/src/script.js b/src/script.js index 99b9e50..eee4d6a 100644 --- a/src/script.js +++ b/src/script.js @@ -1,3 +1,4 @@ +/* global trackEvent */ /* eslint-disable no-extra-semi */ ;(function () {