diff --git a/js/mod/recent-posts-auto-reload.js b/js/mod/recent-posts-auto-reload.js
index 90ba9fdb..e2d661d2 100644
--- a/js/mod/recent-posts-auto-reload.js
+++ b/js/mod/recent-posts-auto-reload.js
@@ -116,7 +116,7 @@ $(document).ready(function(){
var title = document.title;
if (typeof update_title == "undefined") {
- var update_title = function() {
+ var update_title = function() {
if (new_posts) {
document.title = "("+new_posts+") "+title;
} else {
@@ -134,6 +134,7 @@ $(document).ready(function(){
var window_active = true;
$(window).focus(function() {
window_active = true;
+ recheck_activated();
// Reset the delay if needed
if(settings.get('reset_focus', true)) {
@@ -155,7 +156,6 @@ $(document).ready(function(){
});
-
var decrement_timer = function() {
poll_current_time = poll_current_time - 1000;
$('#update_secs').text(poll_current_time/1000);
@@ -165,6 +165,16 @@ $(document).ready(function(){
}
}
+ var recheck_activated = function() {
+ if (new_posts && window_active &&
+ $(window).scrollTop() <=
+ $('header').position().top + $('header').outerHeight(true)) {
+ new_posts = 0;
+ }
+ update_title();
+ first_new_post = null;
+ };
+
// automatically updates the thread after a specified delay
var auto_update = function(delay) {
clearInterval(countdown_interval);
@@ -207,11 +217,11 @@ $(document).ready(function(){
if($('#' + id).length == 0) {
if (!new_posts) {
first_new_post = this;
- makeIcon('reply');
- if (notify === "all") {
- var body = $(this).children('.body').html().replace(/
/gi, "\n");
- var n = new Notification("New reply to "+$('title').text(), {body: $('