Merge pull request #131 from heavygale/ui-domain

hostname ≠ ui-domain
Dieser Commit ist enthalten in:
André Peters 2019-02-08 20:57:39 +01:00 committet von GitHub
Commit 6d5085dc8b
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -21,6 +21,9 @@ if (window.location.href.indexOf('/client/') >= 0) {
if (getParameterByName('name')) { if (getParameterByName('name')) {
setCookie("name", getParameterByName('name')); setCookie("name", getParameterByName('name'));
} }
if (getParameterByName('ui')) {
setCookie("ui", getParameterByName('ui'));
}
if (getParameterByName('port')) { if (getParameterByName('port')) {
setCookie("port", getParameterByName('port')); setCookie("port", getParameterByName('port'));
} }
@ -71,12 +74,15 @@ if (window.location.href.indexOf('/client') >= 0) {
el.innerText = getCookie('host'); el.innerText = getCookie('host');
}); });
Array.prototype.forEach.call(document.getElementsByClassName('client_var_link'), function(el) { Array.prototype.forEach.call(document.getElementsByClassName('client_var_link'), function(el) {
if (!getCookie('host')) { if (!getCookie('ui') && !getCookie('host')) {
el.href = '#'; el.href = '#';
} else if (getCookie('port') != '443') {
el.href = 'https://' + getCookie('host') + ':' + getCookie('port') + '/' + el.getAttribute("href");
} else { } else {
el.href = 'https://' + getCookie('host') + '/' + el.getAttribute("href"); var ui_domain = getCookie('ui') ? getCookie('ui') : getCookie('host');
if (getCookie('port') != '443') {
el.href = 'https://' + ui_domain + ':' + getCookie('port') + '/' + el.getAttribute("href");
} else {
el.href = 'https://' + ui_domain + '/' + el.getAttribute("href");
}
} }
}); });
Array.prototype.forEach.call(document.getElementsByClassName('client_var_email'), function(el) { Array.prototype.forEach.call(document.getElementsByClassName('client_var_email'), function(el) {