]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: There were speed problems with inifinite scroll on firefox
authorMichael Vogel <icarus@dabo.de>
Sun, 3 Nov 2013 12:47:59 +0000 (13:47 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 3 Nov 2013 12:47:59 +0000 (13:47 +0100)
include/bbcode.php
index.php

index 081e4b7c6b0e7df55a6222cc108d7d9f86963d20..e63a8d394ec41f6663b3001acd2327ca13b76c10 100644 (file)
@@ -267,9 +267,11 @@ function bb_ShareAttributes($match) {
         preg_match('/posted="(.*?)"/ism', $attributes, $matches);
         if ($matches[1] != "")
                 $posted = $matches[1];
-               $reldate = (($posted) ? " " . relative_date($posted) : '');
 
-        $headline = '<br /><div class="shared_header">';
+       $reldate = (($posted) ? " " . relative_date($posted) : '');
+
+       $headline = '<div class="shared_header">';
+        //$headline = '<br /><div class="shared_header">';
 
        if ($avatar != "")
                $headline .= '<img src="'.$avatar.'" height="32" width="32" >';
index 3255a805171e88bec05d9107043290695da09cb8..87795ade700acd49faa38bfdadfcfc7609abb408 100644 (file)
--- a/index.php
+++ b/index.php
@@ -494,13 +494,15 @@ var num = $pageno;
 
 $(window).scroll(function(e){
 
-       // First method that is expected to work - but has problems with Chrome
-       if ($(window).scrollTop() == $(document).height() - $(window).height())
-               loadcontent();
-
-       // This method works with Chrome
-       if ($(window).scrollTop() > (($("section").height() + $("header").height() + $("footer").height()) - $(window).height()))
-               loadcontent();
+       if ($(document).height() != $(window).height()) {
+               // First method that is expected to work - but has problems with Chrome
+               if ($(window).scrollTop() == $(document).height() - $(window).height())
+                       loadcontent();
+       } else {
+               // This method works with Chrome - but seems to be much slower in Firefox
+               if ($(window).scrollTop() > (($("section").height() + $("header").height() + $("footer").height()) - $(window).height()))
+                       loadcontent();
+       }
 });
 </script>