mirror of
https://github.com/jcreek/SelectionWheel.git
synced 2026-07-13 03:03:44 +00:00
Merge pull request #13 from jcreek/1-add-state-to-localstorage
1 add state to localstorage
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "SelectionWheel",
|
"name": "SelectionWheel",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"description": "A fun and simple selection wheel.",
|
"description": "A fun and simple selection wheel.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -228,6 +228,15 @@ function startSpinning() {
|
|||||||
const button = document.getElementById('startSpinning');
|
const button = document.getElementById('startSpinning');
|
||||||
button.onclick = startSpinning;
|
button.onclick = startSpinning;
|
||||||
|
|
||||||
|
const textArea = <HTMLInputElement>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') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
loadServiceWorker();
|
loadServiceWorker();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user