zulip/tools/jslint
Zev Benjamin fab64fd7b0 Make the client reload the page when it detects a server restart
If the client is not composing a message, we can just force a page
reload.  However, if he is composing a message, we must preserve that
message while still reloading as soon as possible.

We take the following approach: if the client has not completed the
composition after 5 minutes, do a compose-preserving reload
(described below).  If he sends the message before the timeout
expires, reload the page after a successful send.  If the send fails
(not due to server timeout), however, we do a compose-perserving
reload in case the error was due to the data format changing.  If the
send failed due to server timeout, we don't reload because the reload
will probably also fail.

In a compose-preserving reload, we redirect to an URI that has a
fragment indicating we are doing a reload and containing all the
necessary information for restoring the compose window to its
previous state.  On page load, we check the fragment to see if we
just did a compose-preserving reload, and, if we did, we restore the
compose window (or just try the send again in the case of send
failure).  The URI fragment looks like:

(imported from commit af4eeb3930c24118e088057d4da456748fbd2229)
2012-10-16 15:30:41 -04:00
..
check-all Add a new tool for running JSLint 2012-10-04 11:04:25 -04:00
check-all.js Make the client reload the page when it detects a server restart 2012-10-16 15:30:41 -04:00
jslint.js Import JSLint 2012-10-04 11:04:25 -04:00