code review: more in line with Google Analytics doc

This commit is contained in:
gorhill 2015-12-27 01:49:18 -05:00
parent 0b97f95392
commit 822faa74e3
2 changed files with 7 additions and 4 deletions

View File

@ -5,7 +5,7 @@ f7c529ec45cca5b2a584a2597c2e96a3 assets/ublock/filters.txt
146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt 146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt 5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
890e6b30c6a4cfd2ac5aa1bbe36d30fe assets/ublock/experimental.txt 890e6b30c6a4cfd2ac5aa1bbe36d30fe assets/ublock/experimental.txt
5830ba4852b7dda0950d955ce95eb91e assets/ublock/resources.txt 42bf6b936b33ba0f7bb03a87dbd40160 assets/ublock/resources.txt
9b486d2c137467e2f4c651c0f8e721c8 assets/ublock/filter-lists.json 9b486d2c137467e2f4c651c0f8e721c8 assets/ublock/filter-lists.json
50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt 50573388b525ede1a920cd4b4ee7fbf0 assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
61cc16cf02e034370f0f47bc17c46551 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt 61cc16cf02e034370f0f47bc17c46551 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt

View File

@ -173,11 +173,14 @@ www.google-analytics.com/ga.js application/javascript
www.google-analytics.com/analytics.js application/javascript www.google-analytics.com/analytics.js application/javascript
(function() { (function() {
var ga = function(a, b, c, d, e, f) { // https://developers.google.com/analytics/devguides/collection/analyticsjs/
if ( typeof f !== 'object' || typeof f.hitCallback !== 'function' ) { var ga = function() {
var len = arguments.length;
if ( len === 0 ) {
return; return;
} }
if ( d === 'click' ) { var f = arguments[len-1];
if ( typeof f === 'object' && typeof f.hitCallback === 'function' ) {
f.hitCallback(); f.hitCallback();
} }
}; };