Jeremy Schomery 2017-03-13 22:56:43 +03:30
parent e109f882da
commit 708ff97723
3 changed files with 20 additions and 12 deletions

View File

@ -1,6 +1,7 @@
body {
width: 252px;
font-size: 12px;
height: 50px; /**/
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
}
input[type=checkbox] {

View File

@ -37,6 +37,18 @@
</head>
<body id="stylus-popup">
<!-- confirm -->
<div id="confirm">
<div>
<b>Style's Name</b>
<span i18n-text="deleteStyleConfirm"></span>
<div>
<input type="button" i18n-value="confirmCancel" data-cmd="cancel">
<input type="button" i18n-value="confirmOK" data-cmd="ok">
</div>
</div>
</div>
<div id="unavailable">
<div class="main-controls"><span id="unavailable-message" i18n-text="stylishUnavailableForURL"></span>
</div>
@ -67,17 +79,6 @@
<button id="popup-shortcuts-button" i18n-text="openShortcutsPopup"></button>
</div>
</div>
<!-- confirm -->
<div id="confirm">
<div>
<b>Style's Name</b>
<span i18n-text="deleteStyleConfirm"></span>
<div>
<input type="button" i18n-value="confirmCancel" data-cmd="cancel">
<input type="button" i18n-value="confirmOK" data-cmd="ok">
</div>
</div>
</div>
<script src="popup.js"></script>
</body>

View File

@ -127,7 +127,13 @@ document.getElementById('confirm').addEventListener('click', e => {
let cmd = e.target.dataset.cmd;
if (cmd === 'ok') {
deleteStyle(document.getElementById('confirm').dataset.id, () => {
//window.close();
// update view with 'No styles installed for this site' message
if (document.getElementById('installed').children.length === 0) {
showStyles([]);
}
// force Chrome to minimize popup's height
document.body.style.height = '10px';
document.documentElement.style.height = '10px';
});
}
//