2 Commits

Author SHA1 Message Date
Josh Creek 39d4ded1fb chore(#1): Update version number 2022-10-08 17:19:00 +01:00
Josh Creek eff426550b feat(#1): Add state to localstorage 2022-10-08 17:17:41 +01:00
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -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": {
+9
View File
@@ -228,6 +228,15 @@ function startSpinning() {
const button = document.getElementById('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') {
loadServiceWorker();
}