From 362e6c8760711626da079611aa457aa00ce4b5b7 Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 9 Apr 2010 19:15:38 -0700 Subject: cleaned the code a tiny bit before merging --- static/js/pichat.js | 18 ++++++++++-------- static/webcam/webcam.js | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'static') diff --git a/static/js/pichat.js b/static/js/pichat.js index bdd2471..111f574 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -22,22 +22,20 @@ isEmptyObject = function(obj) { } -function isCSSPropertySupported(prop){ - return prop in document.body.style; -} +function isCSSPropertySupported(prop){ return prop in document.body.style } function escapeHtml(txt) { if (!txt) { return ""; } else { return $("").text(txt).html(); } } - URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; function getImagesAsArray(text) { var imgs = [] var urls = text.match(URLRegex) + if (urls === null) return imgs for (var i = 0; i