/*
 * Copyright (C) 2016 by Arena of Titans Contributors.
 *
 * This file is part of Arena of Titans.
 *
 * Arena of Titans is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Arena of Titans is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Arena of Titans. If not, see <http://www.gnu.org/licenses/>.
 */

if (/.*arenaoftitans\.(com|fr)/.test(window.location.host)) {
    var _paq = _paq || [];
    var siteId;
    var domains;
    if (/^www/.test(window.location.host)) {
        siteId = 3;
        domains = ["*.www.last-run.fr", "*.www.last-run.com"];
    } else {
        siteId = 4;
        domains = ["*.dev.last-run.com"];
    }
    (function () {
        var u = "//piwik.jujens.eu/";
        if (siteId === undefined) {
            return;
        }

        _paq.push(["setDomains", domains]);
        _paq.push(['setTrackerUrl', u + 'piwik.php']);
        _paq.push(['setSiteId', siteId]);
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
    })();
}

@@ -1122,17 +1122,16 @@
 function
- 
 () %7B%0A   
@@ -1295,17 +1295,17 @@
 q.push(%5B
-'
+%22
 setTrack
@@ -1313,16 +1313,16 @@
 rUrl
-'
+%22
 , u + 
-'
+%22
 piwi
@@ -1326,17 +1326,17 @@
 iwik.php
-'
+%22
 %5D);%0A    
@@ -1350,17 +1350,17 @@
 q.push(%5B
-'
+%22
 setSiteI
@@ -1360,17 +1360,17 @@
 etSiteId
-'
+%22
 , siteId
@@ -1392,17 +1392,17 @@
 q.push(%5B
-'
+%22
 trackPag
@@ -1406,17 +1406,17 @@
 PageView
-'
+%22
 %5D);%0A    
@@ -1430,17 +1430,17 @@
 q.push(%5B
-'
+%22
 enableLi
@@ -1453,9 +1453,9 @@
 king
-'
+%22
 %5D);%0A

reformat tracking script