diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-09-19 09:17:01 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-09-19 09:17:01 -0400 |
| commit | 6996ef1862ec133e6d15ef06b660605d1192b166 (patch) | |
| tree | e64ae1b4548fbe53b4cca45e67fa723e707ed841 /static/js | |
| parent | b04eea907242bb895f9578638f5f05612311fa66 (diff) | |
make / show top for today ; and sundry changes
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/pichat.js | 1 | ||||
| -rwxr-xr-x | static/js/register.js | 24 | ||||
| -rw-r--r-- | static/js/src/_main.js | 1 |
3 files changed, 25 insertions, 1 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 1003880..0ed479a 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -246,6 +246,7 @@ window.Preferences = { $.cookie(prop, null, { domain: Preferences.Domain, path: '/' }); } }; + window.Away = { "UnseenMsgCounter": 0, "OrigTitle": "", diff --git a/static/js/register.js b/static/js/register.js index d2d513d..4352c19 100755 --- a/static/js/register.js +++ b/static/js/register.js @@ -64,8 +64,30 @@ function submitRegistration() { }); } +function hasLocalStorage() { + try { + return 'localStorage' in window && window['localStorage'] !== null; + } catch (e) { + return false; + } +} + function initRegister() { - $('#submit').click(submitRegistration); + var date = new Date () + var open_reg = false || ! ('LoggedIn' in window) + if (hasLocalStorage() && localStorage.is_banned == "true") { + $('.regopen').remove() + $('.log-in').remove() + $('#forgetpw').remove() + return + } + if (open_reg || ( date.getHours() >= 8 && date.getHours() <= 17 )) { + $('.regclosed').remove() + $('#submit').click(submitRegistration); + } + else { + $('.regopen').remove() + } } // sha1.js diff --git a/static/js/src/_main.js b/static/js/src/_main.js index b2fe1a9..c95b98a 100644 --- a/static/js/src/_main.js +++ b/static/js/src/_main.js @@ -46,3 +46,4 @@ window.Preferences = { $.cookie(prop, null, { domain: Preferences.Domain, path: '/' }); } }; + |
