This commit is contained in:
Jeremy Schomery 2017-03-08 16:41:26 +03:30
parent 974aaee823
commit 885bab9a03
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ function restore () {
chrome.runtime.getBackgroundPage(bg => {
document.getElementById('badgeDisabled').value = bg.prefs.get('badgeDisabled');
document.getElementById('badgeNormal').value = bg.prefs.get('badgeNormal');
document.getElementById('popupWidth').value = bg.prefs.get('popupWidth');
document.getElementById('popupWidth').value = localStorage.getItem('popupWidth') || '246';
document.getElementById('updateInterval').value = bg.prefs.get('updateInterval');
});
}
@ -13,7 +13,7 @@ function save () {
chrome.runtime.getBackgroundPage(bg => {
bg.prefs.set('badgeDisabled', document.getElementById('badgeDisabled').value);
bg.prefs.set('badgeNormal', document.getElementById('badgeNormal').value);
bg.prefs.set('popupWidth', +document.getElementById('popupWidth').value);
localStorage.setItem('popupWidth', document.getElementById('popupWidth').value);
bg.prefs.set(
'updateInterval',
Math.max(0, +document.getElementById('updateInterval').value)

View File

@ -1,5 +1,5 @@
body {
width: 240px;
width: 252px;
font-size: 12px;
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
}

View File

@ -229,4 +229,4 @@ document.querySelector('#popup-shortcuts-button').addEventListener("click", func
});
// popup width
document.body.style.width = prefs.get('popupWidth') + 'px';
document.body.style.width = (localStorage.getItem('popupWidth') || '246') + 'px';