From 1184861a0d316381a6cab36a81c611f60aad0df3 Mon Sep 17 00:00:00 2001 From: Jason Barnabe Date: Wed, 3 Jul 2013 11:43:42 -0500 Subject: [PATCH] Don't target=_new when opening manage window --- popup.html | 2 +- popup.js | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/popup.html b/popup.html index a847cf60..35f36be1 100644 --- a/popup.html +++ b/popup.html @@ -48,7 +48,7 @@
-
+
diff --git a/popup.js b/popup.js index 980106ed..a122babb 100644 --- a/popup.js +++ b/popup.js @@ -37,13 +37,23 @@ function enable(event, enabled) { } function doDelete() { - if (!confirm(t('deleteStyleConfirm'))) { - return; + // Opera can't do confirms in popups + if (getBrowser() != "Opera") { + if (!confirm(t('deleteStyleConfirm'))) { + return; + } } var id = getId(event); deleteStyle(id); } +function getBrowser() { + if (navigator.userAgent.indexOf("Opera") > -1) { + return "Opera"; + } + return "Chrome"; +} + function getId(event) { var e = event.target; while (e) {