mirror of
https://github.com/donl/gPanel.git
synced 2026-05-26 14:22:18 -06:00
21 lines
641 B
JavaScript
21 lines
641 B
JavaScript
/* Store bundle name in global variable */
|
|
var BUNDLE_NAME = "";
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', 'api/settings/name', true);
|
|
xhr.send();
|
|
|
|
xhr.onloadend = function() {
|
|
if(xhr.status == 200) {
|
|
BUNDLE_NAME = xhr.response;
|
|
jQuery('.navbar-brand').append(' - ' + BUNDLE_NAME);
|
|
}
|
|
else {
|
|
if (xhr.response != undefined && xhr.response.length != 0) {
|
|
alert('Error getting bundle name: ' + xhr.status);
|
|
}
|
|
else {
|
|
alert('An error has occurred while getting the bundle name. If problem persists please contact your community administrator.');
|
|
}
|
|
}
|
|
}
|