Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2014-07-25 10:09:28 +0400
committerThomas Steur <tsteur@users.noreply.github.com>2014-07-25 10:09:28 +0400
commit53c792c93ad56f7690c17a8abe3aeae6aad90bcf (patch)
treec305df08059960769b77b9aad6d7937de5e9ee7a /js
parent5b1fa81cba0fe54c5118a642ceacac91159f45da (diff)
parent9e5cae9504c6552900c287ae9db53d82b7329332 (diff)
Merge pull request #5872 from craue/code-cleanup-3
code cleanup
Diffstat (limited to 'js')
-rw-r--r--js/LICENSE.txt46
-rw-r--r--js/README.md4
-rw-r--r--js/piwik.js6
3 files changed, 26 insertions, 30 deletions
diff --git a/js/LICENSE.txt b/js/LICENSE.txt
index 76258a846d..29e718b4c5 100644
--- a/js/LICENSE.txt
+++ b/js/LICENSE.txt
@@ -1,32 +1,32 @@
Copyright 2013 Anthon Pang
-All rights reserved.
+All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
-* Neither the name of Anthon Pang nor the names of its contributors
- may be used to endorse or promote products derived from this
- software without specific prior written permission.
+* Neither the name of Anthon Pang nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View online: http://piwik.org/free-software/bsd/
diff --git a/js/README.md b/js/README.md
index 478fea68d7..dc4220836e 100644
--- a/js/README.md
+++ b/js/README.md
@@ -32,7 +32,7 @@ The js/ folder contains:
$ wget http://www.julienlecomte.net/yuicompressor/yuicompressor-2.4.2.zip
$ unzip yuicompressor-2.4.2.zip
```
-
+
To compress the code containing the evil "eval", either apply the patch from
http://yuilibrary.com/projects/yuicompressor/ticket/2343811,
or run:
@@ -41,7 +41,7 @@ The js/ folder contains:
$ cd /path/to/piwik/js/
$ sed '/<DEBUG>/,/<\/DEBUG>/d' < piwik.js | sed 's/eval/replacedEvilString/' | java -jar yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar --type js --line-break 1000 | sed 's/replacedEvilString/eval/' | sed 's/^[/][*]/\/*!/' > piwik-min.js && cp piwik-min.js ../piwik.js
```
-
+
This will generate the minify /path/to/piwik/js/piwik-min.js and copy it to
/path/to/piwik/piwik.js
diff --git a/js/piwik.js b/js/piwik.js
index 05e758b3e2..df0df454b2 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -1222,7 +1222,6 @@ if (typeof Piwik !== 'object') {
// Visitor UUID
visitorUUID;
-
/*
* Set cookie value
*/
@@ -1694,7 +1693,6 @@ if (typeof Piwik !== 'object') {
lastVisitTs = currentVisitTs;
}
-
// Detect the campaign information from the current URL
// Only if campaign wasn't previously set
// Or if it was set but we must attribute to the most recent one
@@ -1766,7 +1764,6 @@ if (typeof Piwik !== 'object') {
(String(referralUrl).length ? '&_ref=' + encodeWrapper(purify(referralUrl.slice(0, referralUrlMaxLength))) : '') +
(charSet ? '&cs=' + encodeWrapper(charSet) : '');
-
// browser features
for (i in browserFeatures) {
if (Object.prototype.hasOwnProperty.call(browserFeatures, i)) {
@@ -2933,7 +2930,7 @@ if (typeof Piwik !== 'object') {
/**
* Set the server generation time.
* If set, the browser's performance.timing API in not used anymore to determine the time.
- *
+ *
* @param int generationTime
*/
setGenerationTimeMs: function (generationTime) {
@@ -3053,7 +3050,6 @@ if (typeof Piwik !== 'object') {
});
},
-
/**
* Used to record that the current page view is an item (product) page view, or a Ecommerce Category page view.
* This must be called before trackPageView() on the product/category page.