;(function () { var currentProfile = ApiUtil.getParam('profile') || 'default'; ApiUtil.post('system.profile.list', {}, function (resp) { var profileList = resp.data; var html = ['
']; html.push('') html.push('
') $('.x-body').prepend(html.join('')); }); function getCurrentPage(profile) { var currentUrl = location.href.toString(); var indexStart = currentUrl.lastIndexOf('/') + 1; var indexEnd = currentUrl.lastIndexOf('?'); var page = indexEnd > -1 ? currentUrl.substring(indexStart, indexEnd) : currentUrl.substring(indexStart); return page + '?q=' + new Date().getTime() + '&profile=' + profile; } window.profile = currentProfile; })();