2016-08-27 17:58:27 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
var location = window.location;
|
|
|
|
if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var protocol = location.protocol;
|
|
|
|
if (protocol === 'https:') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var url = 'https:' + window.location.href.substring(protocol.length);
|
2016-08-27 21:59:59 +02:00
|
|
|
// Pass the referrer info to the new URL for Google Analytics.
|
|
|
|
if (document.referrer) {
|
|
|
|
var referrerPart = 'referrer=' + encodeURIComponent(document.referrer);
|
|
|
|
url += (location.search ? '&' : '?') + referrerPart;
|
|
|
|
}
|
2016-08-27 17:58:27 +02:00
|
|
|
window.location.href = url;
|
|
|
|
})();
|