From 5ca88af2220380f65c3afdeb76ce1ef9e95cb6d2 Mon Sep 17 00:00:00 2001 From: Scott Ostler Date: Thu, 15 Jul 2010 00:08:53 -0700 Subject: Update middle-click handling of images in webkit browsers --- static/js/pichat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index 323e05b..44db3cf 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -95,12 +95,12 @@ function annoyingCaps(text){ return chunks.join(" ") } -var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; + function imgClickHandler() { // Ugly hack. Don't open new links in chat, only in logs. // Ugly hack mkII: ensure middle-click opens images in new tab // c.f. http://code.google.com/p/chromium/issues/detail?id=255 - if (is_chrome && event.button != 0) { + if ($.browser.webkit && event.button != 0) { event.stopPropagation(); } else { return $('#chatrap').length == 0; -- cgit v1.2.3-70-g09d2