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

14 lines
527 B
JavaScript
Raw Normal View History

$(function() {
$.getJSON('js/apps.json', function(data) {
$.each(data, function(id, props) {
var div = $('#'+id).show();
if (props.hasOwnProperty('url'))
div.find('h2 a').attr('href', props.url.replace('{host}', window.location.hostname));
if (props.hasOwnProperty('login'))
div.find('.login').text(props.login);
if (props.hasOwnProperty('password'))
div.find('.password').text(props.password);
});
});
});