diff options
author | sgiehl <stefan@piwik.org> | 2015-04-05 22:42:22 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-04-05 22:42:22 +0300 |
commit | 7bbcb5ec96d1d2ff64a5a4175a5d5d697e43fcba (patch) | |
tree | 2ebaaef80ca89a31effb591f61c41946660d997c /js | |
parent | 46d1825f7f4dab911d9f3908c393ad6e4a3e634f (diff) |
fix jslint tests
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/piwik.js b/js/piwik.js index bc9b89149f..d4fef8025d 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -418,7 +418,7 @@ if (typeof JSON2 !== 'object') { setCustomData, getCustomData, setCustomRequestProcessing, setCustomVariable, getCustomVariable, deleteCustomVariable, storeCustomVariablesInCookie, - setDownloadExtensions, addDownloadExtensions, + setDownloadExtensions, addDownloadExtensions, removeDownloadExtensions, setDomains, setIgnoreClasses, setRequestMethod, setRequestContentType, setReferrerUrl, setCustomUrl, setAPIUrl, setDocumentTitle, setDownloadClasses, setLinkClasses, @@ -4474,10 +4474,11 @@ if (typeof Piwik !== 'object') { * @param string|array extensions for example 'custom' or ['custom1','custom2','custom3'] */ addDownloadExtensions: function (extensions) { + var i; if(isString(extensions)) { extensions = extensions.split('|'); } - for (var i=0; i < extensions.length; i++) { + for (i=0; i < extensions.length; i++) { configDownloadExtensions.push(extensions[i]); } }, @@ -4488,11 +4489,11 @@ if (typeof Piwik !== 'object') { * @param string|array extensions for example 'custom' or ['custom1','custom2','custom3'] */ removeDownloadExtensions: function (extensions) { + var i, newExtensions = []; if(isString(extensions)) { extensions = extensions.split('|'); } - var newExtensions = []; - for (var i=0; i < configDownloadExtensions.length; i++) { + for (i=0; i < configDownloadExtensions.length; i++) { if (indexOfArray(extensions, configDownloadExtensions[i]) === -1) { newExtensions.push(configDownloadExtensions[i]); } |