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="installed"></div>
|
||||||
|
|
||||||
<div id="find-styles"><a id="find-styles-link" href="#"></a></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>
|
<script src="popup.js"></script>
|
||||||
|
|
||||||
|
|
10
popup.js
10
popup.js
|
@ -37,13 +37,23 @@ function enable(event, enabled) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function doDelete() {
|
function doDelete() {
|
||||||
|
// Opera can't do confirms in popups
|
||||||
|
if (getBrowser() != "Opera") {
|
||||||
if (!confirm(t('deleteStyleConfirm'))) {
|
if (!confirm(t('deleteStyleConfirm'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var id = getId(event);
|
var id = getId(event);
|
||||||
deleteStyle(id);
|
deleteStyle(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBrowser() {
|
||||||
|
if (navigator.userAgent.indexOf("Opera") > -1) {
|
||||||
|
return "Opera";
|
||||||
|
}
|
||||||
|
return "Chrome";
|
||||||
|
}
|
||||||
|
|
||||||
function getId(event) {
|
function getId(event) {
|
||||||
var e = event.target;
|
var e = event.target;
|
||||||
while (e) {
|
while (e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user