Skip to content

Commit

Permalink
Tweaks Goonchat loading process
Browse files Browse the repository at this point in the history
- Re-loads output pane twice as fast, re-sends assets less often, and
ensures output pane HTML does not get cached.
- Updates the loading message to be more useful.
  • Loading branch information
Krausus committed Jan 16, 2017
1 parent e62c3eb commit 24c6e0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions goon/browserassets/html/browserOutput.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<i class="icon-spinner icon-2x"></i>
<div>
Loading...<br><br>
If this takes longer than 30 seconds, it will automatically reload a maximum of 5 times.<br>
If it <b>still</b> doesn't work, use the bug report button at the top right of the window.
If this takes longer than 10 seconds, it will automatically reload, multiple times if necessary.<br>
If it <b>still</b> doesn't work, please adminhelp (F1) and tell us your operating system and Internet Explorer version.
</div>
</div>
<div id="messages">
Expand Down
9 changes: 5 additions & 4 deletions goon/code/datums/browserOutput.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ var/list/chatResources = list(
for(var/asset in global.chatResources)
owner << browse_rsc(file(asset))

owner << browse(file("goon/browserassets/html/browserOutput.html"), "window=browseroutput")
sleep(20 SECONDS)
if(!owner || loaded)
break
for(var/subattempts = 1 to 3)
owner << browse(file2text("goon/browserassets/html/browserOutput.html"), "window=browseroutput")
sleep(10 SECONDS)
if(!owner || loaded)
return

/datum/chatOutput/Topic(var/href, var/list/href_list)
if(usr.client != owner)
Expand Down

0 comments on commit 24c6e0d

Please sign in to comment.