diff --git a/package.json b/package.json index 4957afe..cde347d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SelectionWheel", - "version": "1.2.0", + "version": "1.3.0", "description": "A fun and simple selection wheel.", "main": "index.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 84b19ad..f8b7015 100644 --- a/src/index.ts +++ b/src/index.ts @@ -228,6 +228,15 @@ function startSpinning() { const button = document.getElementById('startSpinning'); button.onclick = startSpinning; +const textArea = document.getElementById('input-lines'); +if (window.localStorage.TextEditorData) { + textArea.value = window.localStorage.TextEditorData; +} + +textArea.addEventListener('keyup', () => { + window.localStorage.TextEditorData = textArea.value; +}); + if (process.env.NODE_ENV === 'production') { loadServiceWorker(); }