From d60aea9333b2c52bbc7200e5816997d4513cca93 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 3 Sep 2017 19:54:25 +0300 Subject: [PATCH] followup d3b7b454: subscribe to 'editor.options.expanded' --- edit/edit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edit/edit.js b/edit/edit.js index d48d8b35..46118226 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -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();