summaryrefslogtreecommitdiffstats
path: root/pages/chat.php
diff options
context:
space:
mode:
authorSnap <snapwilliam@gmail.com>2015-04-28 15:53:05 -0700
committerSnap <snapwilliam@gmail.com>2015-04-28 15:53:05 -0700
commite90a8d192446fce277dc3efe4f2913d5fecca0dc (patch)
treef091064290aa73a2b54ec83262b09725f74d7ff8 /pages/chat.php
parent79d3c716e38084beab01d34a5f49a5aee7e72526 (diff)
downloadpathery-e90a8d192446fce277dc3efe4f2913d5fecca0dc.tar.xz
Chat improvements.
Fixed "&P" or ";P" bug. Reduced size of chat-request size considerably with use of header_remove();
Diffstat (limited to 'pages/chat.php')
-rw-r--r--pages/chat.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/pages/chat.php b/pages/chat.php
index 4f10a1c..cc8d0eb 100644
--- a/pages/chat.php
+++ b/pages/chat.php
@@ -46,12 +46,13 @@ function getChatTimer() {
//addChatMessage("Debug", "Chat timer called!");
}
-pollChannelListTimer();
-function pollChannelListTimer() {
- setTimeout("pollChannelListTimer()", channelTimerDelay);
- pollChannelList();
-}
+var pollChannelListTimer = setInterval(function () {pollChannelList()}, channelTimerDelay);
+// pollChannelListTimer();
+// function pollChannelListTimer() {
+ // setTimeout("pollChannelListTimer()", channelTimerDelay);
+ // pollChannelList();
+// }
var firstGetChat = true;
function getChatDone(data) {
@@ -212,7 +213,7 @@ function replaceSmileys(chat) {
chat = chat.replace(/\:d/gi, '<img title=":D" class="chatSmiley" src="images/smileys/Grinning.png" />');
chat = chat.replace(/\:o/gi, '<img title=":O" class="chatSmiley" src="images/smileys/Gasping.png" />');
chat = chat.replace(/\:p/gi, '<img title=":P" class="chatSmiley" src="images/smileys/Tongue_Out.png" />');
- chat = chat.replace(/;p/gi, '<img title=":s" class="chatSmiley" src="images/smileys/Tongue_Out_Winking.png" />');
+ chat = chat.replace(/;p/gi, '<img title=";p" class="chatSmiley" src="images/smileys/Tongue_Out_Winking.png" />');
chat = chat.replace(/\:c/gi, '<img title=":c" class="chatSmiley" src="images/smileys/Childish.png" />');
chat = chat.replace(/\:s/gi, '<img title=":s" class="chatSmiley" src="images/smileys/Confused.png" />');
chat = chat.replace(/\&gt;_\&lt;/g, '<img title=">_<" class="chatSmiley" src="images/smileys/Gah.png" />');
@@ -314,8 +315,11 @@ function channelListShow(JO) {
// u.secFromLastActive could be used in here someplace..
+ var dateEntered = new Date();
+ dateEntered.setTime(dateEntered.getTime() + u.secFromEntered * 1000);
+
if (u.wallEmblem == undefined) u.wallEmblem = 'blank.png';
- p = p+ "<tr style='"+styleClass+" background-color: "+u.background+"; color:"+u.displayColor+";' title=''>";
+ p = p+ "<tr style='"+styleClass+" background-color: "+u.background+"; color:"+u.displayColor+";' title='Entered channel " + dateEntered.format("ddd h:MM TT") + "'>";
p = p+ "<td style='vertical-align: middle;width:100px;'>";
p = p+ " <div class='grid_td' style='float:left; width:35px; height:35px; background:"+u.wallColor+" url("+linkEmblem(u.wallEmblem, u.wallOrientation)+");'>";