@@ -416,104 +416,4 @@ |
||
416 | 416 | |
417 | 417 | var win = $(window); |
418 | 418 | var lastPostId = "<?php echo $lastPostId; ?>"; |
419 | - var view = "<?php echo $view; ?>" |
|
420 | - var old_lastPostId = ""; |
|
421 | - var morePostsAvailable = true; |
|
422 | - |
|
423 | - if(window.location.hash) |
|
424 | - { |
|
425 | - var hash = window.location.hash.slice(1); |
|
426 | - |
|
427 | - if(!$("article[id='"+ hash +"']").length) |
|
428 | - { |
|
429 | - for (var i = 5; i >= 0; i--) |
|
430 | - { |
|
431 | - if(!$("article[id='"+ hash +"']").length) |
|
432 | - { |
|
433 | - $.ajax({ |
|
434 | - url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view, |
|
435 | - dataType: 'html', |
|
436 | - async: false, |
|
437 | - success: function(html) { |
|
438 | - var div = document.createElement('div'); |
|
439 | - div.innerHTML = html; |
|
440 | - var elements = div.childNodes; |
|
441 | - old_lastPostId = lastPostId; |
|
442 | - lastPostId = elements[3].textContent; |
|
443 | - lastPostId = lastPostId.replace(/\s+/g, ''); |
|
444 | - //alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId); |
|
445 | - if(lastPostId == old_lastPostId) { |
|
446 | - |
|
447 | - //morePostsAvailable = false; |
|
448 | - } |
|
449 | - else { |
|
450 | - //alert(elements[3].textContent); |
|
451 | - $('#posts').append(elements[1].innerHTML); |
|
452 | - $('#posts').hide().show(0); |
|
453 | - } |
|
454 | - $('#loading').hide(); |
|
455 | - } |
|
456 | - }); |
|
457 | - |
|
458 | - $('.jodel > content').Emoji(); |
|
459 | - } |
|
460 | - |
|
461 | - } |
|
462 | - scrollToAnchor(hash); |
|
463 | - |
|
464 | - } |
|
465 | - } |
|
466 | - |
|
467 | - // Each time the user scrolls |
|
468 | - win.scroll(function() { |
|
469 | - |
|
470 | - |
|
471 | - // End of the document reached? |
|
472 | - if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable) |
|
473 | - { |
|
474 | - $('#loading').show(); |
|
475 | - |
|
476 | - $.ajax({ |
|
477 | - url: 'get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view, |
|
478 | - dataType: 'html', |
|
479 | - async: false, |
|
480 | - success: function(html) { |
|
481 | - var div = document.createElement('div'); |
|
482 | - div.innerHTML = html; |
|
483 | - var elements = div.childNodes; |
|
484 | - old_lastPostId = lastPostId; |
|
485 | - lastPostId = elements[3].textContent; |
|
486 | - lastPostId = lastPostId.replace(/\s+/g, ''); |
|
487 | - //alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId); |
|
488 | - if(lastPostId == old_lastPostId) |
|
489 | - { |
|
490 | - |
|
491 | - //morePostsAvailable = false; |
|
492 | - } |
|
493 | - else |
|
494 | - { |
|
495 | - //alert(elements[3].textContent); |
|
496 | - $('#posts').append(elements[1].innerHTML); |
|
497 | - } |
|
498 | - $('#loading').hide(); |
|
499 | - } |
|
500 | - }); |
|
501 | - |
|
502 | - $('.jodel > content').Emoji(); |
|
503 | - } |
|
504 | - }); |
|
505 | - <?php } ?> |
|
506 | - }); |
|
507 | - |
|
508 | - </script> |
|
509 | - |
|
510 | - <?php |
|
511 | - if(is_file('./piwik-script.html')) |
|
512 | - { |
|
513 | - require_once('./piwik-script.html'); |
|
514 | - } |
|
515 | - ?> |
|
516 | - |
|
517 | - </body> |
|
518 | -</html> |
|
519 | - |
|
419 | + var view = "<?php echo $view |
|
520 | 420 | \ No newline at end of file |