followup d3b7b454: subscribe to 'editor.options.expanded'

This commit is contained in:
tophf 2017-09-03 19:54:25 +03:00
parent e9b174f6e3
commit d60aea9333

View File

@ -1395,10 +1395,12 @@ function initHooks() {
$('#sections-help').addEventListener('click', showSectionHelp, false);
$('#keyMap-help').addEventListener('click', showKeyMapHelp, false);
$('#cancel-button').addEventListener('click', goBackToManage);
$('#options').open = prefs.get('editor.options.expanded');
$('#options h2').addEventListener('click', () => {
setTimeout(() => prefs.set('editor.options.expanded', $('#options').open));
});
prefs.subscribe((key, value) => ($('#options').open = value), ['editor.options.expanded']);
initLint();