followup d3b7b454: subscribe to 'editor.options.expanded'
This commit is contained in:
parent
e9b174f6e3
commit
d60aea9333
|
@ -1395,10 +1395,12 @@ function initHooks() {
|
||||||
$('#sections-help').addEventListener('click', showSectionHelp, false);
|
$('#sections-help').addEventListener('click', showSectionHelp, false);
|
||||||
$('#keyMap-help').addEventListener('click', showKeyMapHelp, false);
|
$('#keyMap-help').addEventListener('click', showKeyMapHelp, false);
|
||||||
$('#cancel-button').addEventListener('click', goBackToManage);
|
$('#cancel-button').addEventListener('click', goBackToManage);
|
||||||
|
|
||||||
$('#options').open = prefs.get('editor.options.expanded');
|
$('#options').open = prefs.get('editor.options.expanded');
|
||||||
$('#options h2').addEventListener('click', () => {
|
$('#options h2').addEventListener('click', () => {
|
||||||
setTimeout(() => prefs.set('editor.options.expanded', $('#options').open));
|
setTimeout(() => prefs.set('editor.options.expanded', $('#options').open));
|
||||||
});
|
});
|
||||||
|
prefs.subscribe((key, value) => ($('#options').open = value), ['editor.options.expanded']);
|
||||||
|
|
||||||
initLint();
|
initLint();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user