diff options
author | Humberto Alfonso Díaz <humberto.alfonso@asvito.es> | 2019-07-01 12:51:32 +0200 |
---|---|---|
committer | Humberto Alfonso Díaz <humberto.alfonso@asvito.es> | 2019-07-01 12:51:32 +0200 |
commit | b99c4849d5a8e8b82d8ae294226e0a13cccdadc6 (patch) | |
tree | 6cbe6813f2aa587ce97b09fff22facbcf69d3812 | |
parent | b8f067bf0fb7c5160723261754a486db1a009784 (diff) |
FUNCT Added black list support
-rw-r--r-- | src/config.json | 6 | ||||
-rw-r--r-- | src/js/app.js | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/config.json b/src/config.json new file mode 100644 index 0000000..006df4b --- /dev/null +++ b/src/config.json @@ -0,0 +1,6 @@ +{ + "black_list": [ + "webapps-html5-homescreen@5.0", + "homescreen@0.1" + ] +}
\ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js index 90fde53..16749c0 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,4 +1,5 @@ import Mustache from 'mustache'; +var configjson = require('../config.json'); var host = document.location.hostname; var port = document.location.port; @@ -40,12 +41,14 @@ function display_icon(app) { function render_applications(apps) { var appContainer = document.getElementById('AppContainer'); for( var i=0; i<apps.length; i++) { - appContainer.innerHTML += Mustache.render(template, apps[i]); - (function(app) { - display_icon(app).then(function() { - show_app(app); - }); - })(apps[i]); + if( configjson.black_list.indexOf(apps[i].id) === -1 ) { + appContainer.innerHTML += Mustache.render(template, apps[i]); + (function(app) { + display_icon(app).then(function() { + show_app(app); + }); + })(apps[i]); + } } } |