Don't target=_new when opening manage window
This commit is contained in:
parent
2064f56796
commit
1184861a0d
|
@ -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>
|
||||
|
||||
|
|
14
popup.js
14
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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user