2017-09-14 21:39:01 +02:00
|
|
|
$(function() {
|
2018-04-29 20:48:57 +02:00
|
|
|
$.getJSON('config.json', function(data) {
|
|
|
|
$.each(data.apps, function(app, appdata) {
|
|
|
|
if (!appdata['tiles-shown'])
|
|
|
|
return true;
|
|
|
|
var div = $('#'+app).show();
|
|
|
|
div.find('.login').text(appdata.login);
|
|
|
|
div.find('.password').text(appdata.password);
|
2018-04-29 20:51:20 +02:00
|
|
|
$.each(appdata.tiles, function(idx, tile) {
|
2018-04-29 20:48:57 +02:00
|
|
|
$('#'+tile).show();
|
2017-12-03 22:46:23 +01:00
|
|
|
});
|
2017-09-14 21:39:01 +02:00
|
|
|
});
|
2018-04-29 20:48:57 +02:00
|
|
|
var host = data.host.domain + (data.host.port != '443' ? ':'+data.host.port : '')
|
|
|
|
$('a').each(function(){
|
|
|
|
$(this).attr('href', $(this).attr('href').replace('{host}', host));
|
|
|
|
});
|
|
|
|
$('span').each(function(){
|
|
|
|
$(this).text($(this).text().replace('{host}', host));
|
|
|
|
});
|
2017-09-14 21:39:01 +02:00
|
|
|
});
|
|
|
|
});
|