summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/index.html
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-10 23:07:52 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-10 23:07:52 +0200
commitfc4e71d7809e6e9975d678ee388fc28c74e0e3af (patch)
treece9624f00ed5a8ab22781476ea1b8196bee53527 /pyload/web/app/index.html
parentnew hoster links, fixed manifest (diff)
downloadpyload-fc4e71d7809e6e9975d678ee388fc28c74e0e3af.tar.xz
several ui fixes
Diffstat (limited to 'pyload/web/app/index.html')
-rw-r--r--pyload/web/app/index.html17
1 files changed, 12 insertions, 5 deletions
diff --git a/pyload/web/app/index.html b/pyload/web/app/index.html
index 28584587c..e8e28f4e1 100644
--- a/pyload/web/app/index.html
+++ b/pyload/web/app/index.html
@@ -19,6 +19,15 @@
<!-- endbuild -->
<script type="text/javascript">
+
+ // Use value set by templateEngine or default val
+ function configValue(string, defaultValue) {
+ if (string.indexOf('{{') > -1)
+ return defaultValue;
+
+ return string;
+ }
+
window.dates = {
weeks: ['week', 'weeks'],
days: ['day', 'days'],
@@ -27,13 +36,11 @@
seconds: ['second', 'seconds']
}; // TODO carefully when translating
- // TODO: use configured values
window.hostProtocol = window.location.protocol + '//';
window.hostAddress = window.location.hostname;
- window.hostPort = '8001';
- window.pathPrefix = "/";
-
- window.wsAddress = "ws://%s:7227"; // TODO
+ window.hostPort = configValue('{{web}}', '8001');
+ window.pathPrefix = '/';
+ window.wsAddress = configValue('{{ws}}', 'ws://%s:7227');
require(['config'], function(Config) {
require(['default'], function(App) {