diff --git a/.gitignore b/.gitignore index 745df75..a7ae7b1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ Thumbs.db Icon? *.swp +*.swo *~ *.zip _site diff --git a/Makefile b/Makefile index d9dd012..34049d1 100755 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CLOSURE_COMPILER = java -jar ~/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS #CLOSURE_COMPILER = java -jar ~/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --formatting PRETTY_PRINT #CLOSURE_COMPILER = java -jar ~/compiler.jar --formatting PRETTY_PRINT -UGLIFYJS = uglifyjs -v +UGLIFYJS = uglifyjs --ascii -v # http://code.google.com/closure/utilities/index.html CLOSURE_LINTER = gjslint diff --git a/src/core.js b/src/core.js index 45b1813..7635c85 100755 --- a/src/core.js +++ b/src/core.js @@ -30,7 +30,6 @@ var document = window.document, slice = Array.prototype.slice, trim = String.prototype.trim, sindexOf = String.prototype.indexOf, - aindexOf = Array.prototype.indexOf, url = document.location.href, documentElement = document.documentElement; @@ -40,7 +39,7 @@ var document = window.document, */ function GAS() { var self = this; - self['version'] = '1.6'; + self['version'] = '1.7'; self._accounts = {}; self._accounts_length = 0; self._queue = _prev_gas; diff --git a/src/header.js b/src/header.js index f5084ef..07db6e6 100755 --- a/src/header.js +++ b/src/header.js @@ -1,8 +1,8 @@ /** - * @preserve Copyright 2011, Cardinal Path and Direct Performance. + * @preserve Copyright 2011, Cardinal Path and DigitalInc. * * GAS - Google Analytics on Steroids - * https://bitbucket.org/dpc/gas + * https://github.com/CardinalPath/gas * * @author Eduardo Cereto * Licensed under the GPLv3 license. diff --git a/src/plugins/mailto.js b/src/plugins/mailto.js index d69168e..78e983a 100755 --- a/src/plugins/mailto.js +++ b/src/plugins/mailto.js @@ -27,7 +27,8 @@ var _gasTrackMailto = function(opts) { this._liveEvent('a', 'mousedown', function(e) { var el = e.target; - if (el && el.href && el.href.toLowerCase().indexOf('mailto:') === 0) { + if (el && el.href && el.href.toLowerCase && + sindexOf.call(el.href.toLowerCase(), 'mailto:') === 0) { _gas.push(['_trackEvent', opts['category'], el.href.substr(7)]); } }); diff --git a/src/plugins/outbound.js b/src/plugins/outbound.js index 2f7065d..daf7e53 100755 --- a/src/plugins/outbound.js +++ b/src/plugins/outbound.js @@ -32,7 +32,7 @@ var _gasTrackOutboundLinks = function(opts) { var l = this; if ( (l.protocol == 'http:' || l.protocol == 'https:') && - sindexOf.call(l.href, document.location.hostname) === -1) + sindexOf.call(l.hostname, document.location.hostname) === -1) { var path = (l.pathname + l.search + ''), utm = sindexOf.call(path, '__utm');