mirror of
https://github.com/jcreek/SelectionWheel.git
synced 2026-07-14 11:43:43 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c51fca8425 | |||
| 866346ea01 | |||
| 050f87301c | |||
| 39d4ded1fb | |||
| eff426550b |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "SelectionWheel",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.1",
|
||||
"description": "A fun and simple selection wheel.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
+10
-1
@@ -182,7 +182,7 @@ function startOver() {
|
||||
function startSpinning() {
|
||||
const textArea = <HTMLInputElement>document.getElementById('input-lines');
|
||||
const inputData = textArea.value.trim()
|
||||
? textArea.value.split('\n')
|
||||
? textArea.value.split('\n').filter((elm) => elm)
|
||||
: testData;
|
||||
const tempData = [];
|
||||
for (let index = 0; index < inputData.length; index += 1) {
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user