]> git.mxchange.org Git - friendica.git/blobdiff - include/main.js
return code is no longer a string
[friendica.git] / include / main.js
index f0cb8571b9ba16c69e64438e8877cf7483caac75..1b5553161c5ad4a958c37a3d3795cf9f7b84266c 100644 (file)
@@ -16,7 +16,7 @@
       document.getElementById(theID).style.display = "none" 
   }
 
-
+       
        var src = null;
        var prev = null;
        var livetime = null;
@@ -24,6 +24,7 @@
        var stopped = false;
        var timer = null;
        var pr = 0;
+       var liking = 0;
 
        $(document).ready(function() {
                $.ajaxSetup({cache: false});
 
                if($('#live-network').length) { src = 'network'; liveUpdate(); }
                if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
+               if($('#live-display').length) { 
+                       if(liking) {
+                               liking = 0;
+                               window.location.href=window.location.href 
+                       }
+               }
+               if($('#live-photos').length)  { 
+                       if(liking) {
+                               liking = 0;
+                               window.location.href=window.location.href 
+                       }
+               }
 
                if(! stopped) {
                        $.get("ping",function(data) {
                $.get('like/' + ident.toString() + '?verb=' + verb );
                if(timer) clearTimeout(timer);
                timer = setTimeout(NavUpdate,3000);
+               liking = 1;
        }
 
        function getPosition(e) {