summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/autosave.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-08-03 19:27:33 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-08-03 20:00:03 +0100
commit9e4164d417d1f145627a1eff9791f08dcbfc655b (patch)
tree3561257c81892e9cd70e3c2b010612a001fe04b2 /app/assets/javascripts/autosave.js
parentb5b562a3bf22df0e40955e50ad9d42114624bda5 (diff)
downloadgitlab-ce-9e4164d417d1f145627a1eff9791f08dcbfc655b.tar.gz
Keep the replies when the user leaves the page
Diffstat (limited to 'app/assets/javascripts/autosave.js')
-rw-r--r--app/assets/javascripts/autosave.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js
index cfab6c40b34..6000c56665b 100644
--- a/app/assets/javascripts/autosave.js
+++ b/app/assets/javascripts/autosave.js
@@ -2,6 +2,11 @@
import AccessorUtilities from './lib/utils/accessor';
window.Autosave = (function() {
+ /**
+ *
+ * @param {*} field the textarea
+ * @param {Array} key Array with: ['Note', type, id, ]
+ */
function Autosave(field, key) {
this.field = field;
this.isLocalStorageAvailable = AccessorUtilities.isLocalStorageAccessSafe();