Mercurial > cosocket
changeset 84:de80d8393b6b
shift-clicking on a message now toggles the display of HTML source.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 30 Apr 2009 21:01:08 -0700 |
parents | a095f39117d9 |
children | 7e3b3eb57ec2 |
files | media/css/openwebchat.css media/js/openwebchat.js |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/media/css/openwebchat.css Thu Apr 30 20:36:21 2009 -0700 +++ b/media/css/openwebchat.css Thu Apr 30 21:01:08 2009 -0700 @@ -52,6 +52,9 @@ .raw-content { display: none; + font-family: monaco, andale mono, monospace; + font-size: 9pt; + white-space: pre-wrap; } .error {
--- a/media/js/openwebchat.js Thu Apr 30 20:36:21 2009 -0700 +++ b/media/js/openwebchat.js Thu Apr 30 21:01:08 2009 -0700 @@ -223,6 +223,20 @@ var date = Utils.parseJsonDate(msg.time); msg = null; + message.mousedown( + function(evt) { + if (evt.shiftKey) { + evt.preventDefault(); + if ($('.content', this).css('display') == 'none') { + $('.content', this).show(); + $('.raw-content', this).hide(); + } else { + $('.content', this).hide(); + $('.raw-content', this).show(); + } + } + }); + message.mouseenter( function() { $(this).addClass('highlighted');