From 19803db70f2a5a4162d1be2ca0f72eb08e25d544 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Thu, 7 Nov 2019 00:32:15 +0100 Subject: feat: live title edit update the title of the window in sync with the input box --- src/edit.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/edit.js') diff --git a/src/edit.js b/src/edit.js index 910c229..c1018d7 100644 --- a/src/edit.js +++ b/src/edit.js @@ -92,6 +92,10 @@ window.addEventListener('load', () => { fontSizeInput.addEventListener('change', fontSizeChangeHandler); fontSizeInput.dispatchEvent(new Event('change')); + document.getElementById('title').addEventListener('input', e => { + pagetitle = e.target.value; + }); + window.onkeydown = keyboardHandler; window.onbeforeunload = confirmExit; }); -- cgit v1.2.3