Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hi all,

I spent the last two days whipping up a new chatterbox client written in Javascript because I was sick of FullPage Chat and didn't like any of the standalone clients so far.

Obviously, a lot of icing is still missing before it can be used as one's mainstay client (no private message handling and PM markup parsing as of yet), but given the pace at which development has went so far, I'd say it can likely be complete in a couple days. That mostly depends on how much time I find during the week ahead, as I've also got a few other things on my plate at the moment. I wanted to toss it out there for others to ooh and aah at, though. :-) And of course, I need people prodding and poking at it to uncover any boneheaded bugs I build into it.

Even if you don't intend to use this, if you think that web interfaces have to be clunky and cumbersome to use, what with all those roundtrips to the server and the refreshes, you should give it a spin.

This is developed in Firefox 1.0 and tested only in that browser for now; adjusting to other browsers has lower priority and won't be hard. It cannot work in any version Opera and might have issues in Safari as XMLHttpRequest support in these browsers is broken/partial (respectively).

Update to answer FAQ: pressing Enter in the talk box does not send your line by design. I plan to have it react to Ctrl-Enter at some point. For now, tab over to the send button the cursor back will jump back to the talk box by itself once the submission has gone through. FAQ 2: since I had a hard time making the chat buffer fill the window and have scrollbars on it when the content grows, I just made it a fixed size in the interim. If it's too large for you, just change the 480px in the CSS for now.

Download the code, save the file to your harddisk and load it locally. If loaded remotely the script cannot ask for the relaxed security restrictions on loading external content that it needs to function. These issues should eventually vanish as I intend to push this as a favoured alternative over FullPage Chat. There won't be any need to log in separately either then, obviously, as the script will be able to just read your regular PM cookie.


Update: cookie parsing mistake spotted by The Mad Hatter fixed.

Update: XMLHttpRequest instantiation is now crossbrowser, though I don't know if the script actually works in anything but Firefox because of that.

Update: auto-scrolling will no longer bump you to the bottom on refresh if you've manually scrolled the chat buffer. Scroll back to the bottom and it will resume auto-scrolling.

Update: code moved to reply with readmore at tye's request.

Update: labelled the username and password boxes.

Update: another cookie fix.

Update: chatter input box limited to 255 characters.

Makeshifts last the longest.


In reply to A new chatterbox flavour by Aristotle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (3)
    As of 2020-06-06 21:14 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you really want to know if there is extraterrestrial life?



      Results (41 votes). Check out past polls.

      Notices?