summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/snippet/snippet_bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/snippet/snippet_bundle.js')
-rw-r--r--app/assets/javascripts/snippet/snippet_bundle.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/assets/javascripts/snippet/snippet_bundle.js b/app/assets/javascripts/snippet/snippet_bundle.js
index a98403f4cf2..dcee17453b8 100644
--- a/app/assets/javascripts/snippet/snippet_bundle.js
+++ b/app/assets/javascripts/snippet/snippet_bundle.js
@@ -1,12 +1,11 @@
-/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */
/* global ace */
-(function() {
- $(function() {
- var editor = ace.edit("editor");
+import $ from 'jquery';
- $(".snippet-form-holder form").on('submit', function() {
- $(".snippet-file-content").val(editor.getValue());
- });
+export default () => {
+ const editor = ace.edit('editor');
+
+ $('.snippet-form-holder form').on('submit', () => {
+ $('.snippet-file-content').val(editor.getValue());
});
-}).call(window);
+};