mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-10 08:26:19 +02:00
eslint fixes.
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
/* global ga */
|
||||||
|
// eslint-disable-next-line max-params
|
||||||
window.trackEvent = function (category, action, label, value) {
|
window.trackEvent = function (category, action, label, value) {
|
||||||
if (window.ga) {
|
if (window.ga) {
|
||||||
ga('send', 'event', category, action, label, value);
|
ga('send', 'event', category, action, label, value);
|
||||||
@ -7,6 +9,8 @@ window.trackEvent = function (category, action, label, value) {
|
|||||||
// if online, load after sometime
|
// if online, load after sometime
|
||||||
if (navigator.onLine) {
|
if (navigator.onLine) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
(function(i,s,o,g,r,a,m){
|
(function(i,s,o,g,r,a,m){
|
||||||
i['GoogleAnalyticsObject']=r;
|
i['GoogleAnalyticsObject']=r;
|
||||||
i[r]=i[r]||function(){
|
i[r]=i[r]||function(){
|
||||||
@ -18,5 +22,8 @@ if (navigator.onLine) {
|
|||||||
// required for chrome extension protocol
|
// required for chrome extension protocol
|
||||||
ga('set', 'checkProtocolTask', function(){ /* nothing */ });
|
ga('set', 'checkProtocolTask', function(){ /* nothing */ });
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
/* eslint-enable */
|
||||||
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global trackEvent */
|
||||||
/* eslint-disable no-extra-semi */
|
/* eslint-disable no-extra-semi */
|
||||||
;(function () {
|
;(function () {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user