/**
* shoutbox_pun
*
* https://github.com/andrewmichaelsmith/shoutbox_pun
*
*
* Copyright (c) 2012 Andrew Smith
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
var timeout;
var waitTime = 1600;
var lastid = 0;
var done = false;
var myScroll;
var counter = 0;
var firstid = 0;
var pageNo = 0;
$("#loading").hide();
$("#shoutform").append("Expand Chat ▼");
$("#shout").attr("placeholder", "Enter text here. No spoilers for anything, please. Holden has killed for less.");
function getHTMLFromMessage(message)
{
var d = new Date(parseInt($("date", message).text()) * 1000);
var day = ("0" + d.getDate() ).slice(-2);
var month = ("0" + (d.getMonth() + 1)).slice(-2);
var hour = d.getHours();
if (hour < 10) hour = "0" + hour;
var min = d.getMinutes();
if (min < 10) min = "0" + min;
var userid = $("shoutuid", message).text();
var currentuser = $("currentuser", message).text();
var useravatar = $("useravatar", message).text();
var color = "#FFFFFF";
var bgclass = "";
if (currentuser == "true") {
bgclass="currentuser";
color = "gray";
}
// Check for proper avatar.
var avatar = "";
if (useravatar != "")
avatar = "";
return "