summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/init_notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/init_notes.js')
-rw-r--r--app/assets/javascripts/init_notes.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/init_notes.js b/app/assets/javascripts/init_notes.js
new file mode 100644
index 00000000000..3a8b4360cb6
--- /dev/null
+++ b/app/assets/javascripts/init_notes.js
@@ -0,0 +1,14 @@
+/* global Notes */
+
+export default () => {
+ const dataEl = document.querySelector('.js-notes-data');
+ const {
+ notesUrl,
+ notesIds,
+ now,
+ diffView,
+ autocomplete,
+ } = JSON.parse(dataEl.innerHTML);
+
+ window.notes = new Notes(notesUrl, notesIds, now, diffView, autocomplete);
+};