diff --git a/web/src/app/js/base.js b/web/src/app/js/base.js index 5c4417c..7f8516c 100644 --- a/web/src/app/js/base.js +++ b/web/src/app/js/base.js @@ -122,6 +122,12 @@ function getNormalizedURI() { return window.location.pathname.replace(/\/+?$/, ' function capitalize(s) { return s.charAt(0).toUpperCase() + s.substr(1) } function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) } +function s(name) { + if (app.strings === undefined || !name.match(/^[a-zA-Z0-9\.\_]+$/)) + return false; + return eval('app.strings.'+name); +} + function JSON_to_URLEncoded(element,key,list) { var list = list || []; if (typeof(element) == 'object') {