Fossil

Diff
Login

Diff

Differences From Artifact [88f09f051f]:

To Artifact [2e4e6fe492]:


767
768
769
770
771
772
773















774
775
776
777
778
779
780
    cgi_append_content(builtin_text(azJsToLoad[i]),-1);
  }
  if( blob_size(&blobOnLoad)>0 ){
    @ window.onload = function(){
    cgi_append_content(blob_buffer(&blobOnLoad), blob_size(&blobOnLoad));
    cgi_append_content("\n}\n", -1);
  }















  @ </script>
}

/*
** Extra JS to run after all content is loaded.
*/
void style_js_onload(const char *zFormat, ...){







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
    cgi_append_content(builtin_text(azJsToLoad[i]),-1);
  }
  if( blob_size(&blobOnLoad)>0 ){
    @ window.onload = function(){
    cgi_append_content(blob_buffer(&blobOnLoad), blob_size(&blobOnLoad));
    cgi_append_content("\n}\n", -1);
  }
  if( g.iHTTPdIdleTimeout>0 ){
    /* This javascript runs on web-pages that need to periodically send
    ** a keep-alive HTTP request back to the server.  This is typically
    ** used with the "fossil ui" command with a --idle-timeout set.  The
    ** HTTP server will stop if it does not receive a new HTTP request
    ** within some time interval (60 seconds).  This script keeps sending
    ** new HTTP requests every 20 seconds or so to keep the server running
    ** while the page is still viewable.
    */
    /* TODO: move to separate function, or to built-in file enhanced to handle
    ** the g.iHTTPdIdleTimeout variable? */
    @ setInterval(function(){
    @ var xhr=new XMLHttpRequest();xhr.open('GET','/noop',true);xhr.send();
    @ },%d((g.iHTTPdIdleTimeout-1)*1000+100));
  }
  @ </script>
}

/*
** Extra JS to run after all content is loaded.
*/
void style_js_onload(const char *zFormat, ...){