aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2018-08-10 12:02:29 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2018-08-10 12:02:29 +0200
commit4efcf414852ea63d4e276adec620e060f3d734c7 (patch)
tree0ec1a1c47f5bf4371d8a19a3615c10b058c6c1d7
parentab1c1ff7e94d7d19bbbc02f7c460d8cf9926750f (diff)
downloadmitjafelicijan.com-4efcf414852ea63d4e276adec620e060f3d734c7.tar.gz
content update
-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>