]> git.mxchange.org Git - friendica.git/blobdiff - js/main.js
Merge pull request #351 from annando/master
[friendica.git] / js / main.js
index 6a26324419284f42e3771f4db77fc1a4fe4d2a8f..885e042aa34b5e0e8f9e11bbcbc141c5cf365aae 100644 (file)
                
                /* 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);
        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);