Definitely not a good idea to do this here because we aint sure to be logged in ... Actually this whole global.js is absolutely weird

This commit is contained in:
Alexandre Aubin 2019-02-21 18:17:45 +01:00
parent e9b03188fd
commit a84fbb55c8

View file

@ -68,20 +68,4 @@ document.addEventListener('DOMContentLoaded', function() {
addMaildrop.parentNode.insertBefore(inputDropClone, addMaildrop);
});
// Get user's infos
var r = new XMLHttpRequest();
r.open("GET", "/ynhpanel.json", true);
r.onreadystatechange = function () {
// Die if error
if (r.readyState != 4 || r.status != 200) return;
// Response is JSON
response = JSON.parse(r.responseText);
// load additional theme's script
loadScript("/yunohost/sso/assets/themes/"+ response.theme +"/js/ynhpanel.js");
};
r.send();
});