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 { body {
width: 252px; width: 252px;
font-size: 12px; font-size: 12px;
height: 50px; /**/
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif; font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
} }
input[type=checkbox] { input[type=checkbox] {

View File

@ -37,6 +37,18 @@
</head> </head>
<body id="stylus-popup"> <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 id="unavailable">
<div class="main-controls"><span id="unavailable-message" i18n-text="stylishUnavailableForURL"></span> <div class="main-controls"><span id="unavailable-message" i18n-text="stylishUnavailableForURL"></span>
</div> </div>
@ -67,17 +79,6 @@
<button id="popup-shortcuts-button" i18n-text="openShortcutsPopup"></button> <button id="popup-shortcuts-button" i18n-text="openShortcutsPopup"></button>
</div> </div>
</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> <script src="popup.js"></script>
</body> </body>

View File

@ -127,7 +127,13 @@ document.getElementById('confirm').addEventListener('click', e => {
let cmd = e.target.dataset.cmd; let cmd = e.target.dataset.cmd;
if (cmd === 'ok') { if (cmd === 'ok') {
deleteStyle(document.getElementById('confirm').dataset.id, () => { 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';
}); });
} }
// //