Spotter-VM/basic/srv/portal/js/script.js

14 lines
510 B
JavaScript

$(function() {
$.getJSON('apps.json', function(data) {
var host = data._.domain + (data._.port != '443' ? ':'+data._.port : '')
$.each(data, function(id, props) {
var div = $('#'+id).show();
if (props.hasOwnProperty('url'))
div.find('h2 a').attr('href', props.url.replace('{host}', host));
$.each(props, function(key, value) {
div.find('.'+key).text(value.replace('{host}', host));
});
});
});
});