From c80595d16281ccdfb16bd370e165bb86e759e96c Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Thu, 15 Dec 2016 16:26:07 +0100 Subject: [PATCH] make onload fallback actually work, and comment on piwik brokenness with IE10 or lower due to using dataset --- app/authsystem.js | 2 +- app/piwik.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/authsystem.js b/app/authsystem.js index 6ab6a14..92e3772 100644 --- a/app/authsystem.js +++ b/app/authsystem.js @@ -4,7 +4,7 @@ // Call initElements at the earliest possible stage after parsing the document. if (window.addEventListener) { window.addEventListener("DOMContentLoaded", initElements, false); } -else { window.onload = initElements(); } +else { window.onload = initElements; } function initElements() { var jsWarning = document.getElementById("jswarning"); diff --git a/app/piwik.js b/app/piwik.js index ab41f9f..4896dc4 100644 --- a/app/piwik.js +++ b/app/piwik.js @@ -4,6 +4,7 @@ _paq.push(['enableLinkTracking']); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + // dataset does not work with IE10 or lower :( var u=s.parentNode.dataset.piwikurl; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', s.parentNode.dataset.piwiksite]); -- 2.43.0