summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Ostler <scottbot9000@gmail.com>2010-07-15 00:08:53 -0700
committerScott Ostler <scottbot9000@gmail.com>2010-07-15 00:08:53 -0700
commit5ca88af2220380f65c3afdeb76ce1ef9e95cb6d2 (patch)
treef57f58f62bac8811f8648432f9cae7c54fecb5d1
parentb53027ed27f0b1233523752e52b668540730a807 (diff)
Update middle-click handling of images in webkit browsers
-rw-r--r--static/js/pichat.js4
1 files changed, 2 insertions, 2 deletions
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;