savetheinternet / Tinyboard

The better imageboard software
http://tinyboard.org
Other
369 stars 311 forks source link

Update auto-reload.js possible minor issue #104

Closed ghost closed 11 years ago

ghost commented 11 years ago

check if viewing a thread or viewing a board page when updating a thread so new posts do not appear at bottom of page while viewing threads list not sure if this was because of an outdated template but I thought I should point out this as it may affect html templates no matter the code as the banner code is the only code that checks where the user currently is.

MacilPrime commented 11 years ago

Does the if($('div.banner').length == 0) return; check right above it already accomplish this?

ghost commented 11 years ago

"Does the if($('div.banner').length == 0) return; check right above it already accomplish this?" Yes but there is a banner while viewing both a threads page and the threads index so checking if the banner is there or not is only good for pages with the auto-reply.js script running on a page which doesn't have a banner

MacilPrime commented 11 years ago

The div.banner element isn't present on the thread index page (at least not in the current version anyway). Furthermore, checking for the presence of a single .post.op element will still succeed on thread index pages and mod.php?/IP/ pages where there is only one thread OP.