Don't target=_new when opening manage window

This commit is contained in:
Jason Barnabe 2013-07-03 11:43:42 -05:00
parent 2064f56796
commit 1184861a0d
2 changed files with 13 additions and 3 deletions

View File

@ -48,7 +48,7 @@
<div id="installed"></div>
<div id="find-styles"><a id="find-styles-link" href="#"></a></div>
<div id="manage-styles"><a id="open-manage-link" href="manage.html" target="_new"></a></div>
<div id="manage-styles"><a id="open-manage-link" href="manage.html" target="stylishmanage"></a></div>
<script src="popup.js"></script>

View File

@ -37,13 +37,23 @@ function enable(event, enabled) {
}
function doDelete() {
// 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) {