mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:50:12 +00:00
if identity (uid) changes - reload any other open browser windows on next ping.
This commit is contained in:
parent
3ce06caeed
commit
e70573f34c
5 changed files with 267 additions and 249 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue