aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/index.html')
-rw-r--r--tools/editor/index.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/editor/index.html b/tools/editor/index.html
index 1fc44e1..0f4fb79 100644
--- a/tools/editor/index.html
+++ b/tools/editor/index.html
@@ -38,9 +38,13 @@
38 <textarea></textarea> 38 <textarea></textarea>
39 39
40 <script> 40 <script>
41
42 const autoSaveFrequency = 1000;
43 const editor = document.querySelector('textarea');
44
45 editor.focus();
46
41 if (typeof(Storage) !== 'undefined') { 47 if (typeof(Storage) !== 'undefined') {
42 const autoSaveFrequency = 1000;
43 const editor = document.querySelector('textarea');
44 editor.value = localStorage.getItem('content'); 48 editor.value = localStorage.getItem('content');
45 setInterval(function() { 49 setInterval(function() {
46 localStorage.setItem('content', editor.value); 50 localStorage.setItem('content', editor.value);
@@ -48,6 +52,7 @@
48 } else { 52 } else {
49 console.log('storage nok'); 53 console.log('storage nok');
50 } 54 }
55
51 </script> 56 </script>
52 57
53 </body> 58 </body>