On post submission manually update / reload the page for auto-reload.js.

This commit is contained in:
Benjamin Southall 2017-05-04 13:59:52 +09:00
parent 7764bb50aa
commit a68efaec3b

View File

@ -43,6 +43,14 @@ var notify = false;
auto_reload_enabled = true; // for watch.js to interop
$(document).ready(function(){
if($('div.banner').length == 0)
{
return; // not index
}
if($(".post.op").size() != 1)
{
return; //not thread page
}
// Adds Options panel item
if (typeof localStorage.auto_thread_update === 'undefined') {
@ -303,6 +311,11 @@ $(document).ready(function(){
return false;
};
$(post).on('submit', function(e){
poll(manualUpdate = true);
dothis(this);
});
$(window).scrollStopped(function() {
// if the newest post is not visible
if($(this).scrollTop() + $(this).height() <