aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-22 16:01:07 -0700
committerfriendica <info@friendica.com>2012-05-22 16:01:07 -0700
commite70573f34cb6729f45cb020ee9349c8ff948ff3b (patch)
tree7ee57452f2a5a578a03dc75858d201b6b4929a61 /js/main.js
parent3ce06caeed2e817fe401c4d8283beea17d8a34e4 (diff)
downloadvolse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.tar.gz
volse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.tar.bz2
volse-hubzilla-e70573f34cb6729f45cb020ee9349c8ff948ff3b.zip
if identity (uid) changes - reload any other open browser windows on next ping.
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index 6a2632441..885e042aa 100644
--- a/js/main.js
+++ b/js/main.js
@@ -117,6 +117,9 @@
/* nav update event */
$('nav').bind('nav-update', function(e,data){;
+ var invalid = $(data).find('invalid').text();
+ if(invalid == 1) { window.location.href=window.location.href }
+
var net = $(data).find('net').text();
if(net == 0) { net = ''; $('#net-update').removeClass('show') } else { $('#net-update').addClass('show') }
$('#net-update').html(net);
@@ -211,7 +214,8 @@
function NavUpdate() {
if(! stopped) {
- $.get("ping",function(data) {
+ var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
+ $.get(pingCmd,function(data) {
$(data).find('result').each(function() {
// send nav-update event
$('nav').trigger('nav-update', this);