diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 12:06:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 12:06:04 +0300 |
commit | bc89882970d6a14b1f72eb9c715fae90b26d066c (patch) | |
tree | f5cb59d5130d7585980eb39437071e07ebc12f87 /app/assets/javascripts/lib | |
parent | 4a45a787703cb78c6101750cfbdc9f656b934b42 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/notify.js | 14 | ||||
-rw-r--r-- | app/assets/javascripts/lib/utils/text_markdown.js | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/app/assets/javascripts/lib/utils/notify.js b/app/assets/javascripts/lib/utils/notify.js index 3439db1e326..cd509a13193 100644 --- a/app/assets/javascripts/lib/utils/notify.js +++ b/app/assets/javascripts/lib/utils/notify.js @@ -1,12 +1,14 @@ -/* eslint-disable func-names, no-var, consistent-return, prefer-arrow-callback, no-return-assign */ +/* eslint-disable no-var, consistent-return, no-return-assign */ function notificationGranted(message, opts, onclick) { var notification; notification = new Notification(message, opts); - setTimeout(function() { - // Hide the notification after X amount of seconds - return notification.close(); - }, 8000); + setTimeout( + () => + // Hide the notification after X amount of seconds + notification.close(), + 8000, + ); return (notification.onclick = onclick || notification.close); } @@ -32,7 +34,7 @@ function notifyMe(message, body, icon, onclick) { // If it's okay let's create a notification return notificationGranted(message, opts, onclick); } else if (Notification.permission !== 'denied') { - return Notification.requestPermission(function(permission) { + return Notification.requestPermission(permission => { // If the user accepts, let's create a notification if (permission === 'granted') { return notificationGranted(message, opts, onclick); diff --git a/app/assets/javascripts/lib/utils/text_markdown.js b/app/assets/javascripts/lib/utils/text_markdown.js index 7873eaf059f..fec90956a86 100644 --- a/app/assets/javascripts/lib/utils/text_markdown.js +++ b/app/assets/javascripts/lib/utils/text_markdown.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, no-var, no-param-reassign, one-var, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, consistent-return */ +/* eslint-disable func-names, no-var, no-param-reassign, one-var, operator-assignment, no-else-return, prefer-template, consistent-return */ import $ from 'jquery'; import { insertText } from '~/lib/utils/common_utils'; @@ -218,7 +218,7 @@ export function insertMarkdownText({ : blockTagText(text, textArea, blockTag, selected); } else { textToInsert = selectedSplit - .map(function(val) { + .map(val => { if (tag.indexOf(textPlaceholder) > -1) { return tag.replace(textPlaceholder, val); } @@ -301,7 +301,7 @@ export function addMarkdownListeners(form) { export function addEditorMarkdownListeners(editor) { $('.js-md') .off('click') - .on('click', function(e) { + .on('click', e => { const { mdTag, mdBlock, mdPrepend, mdSelect } = $(e.currentTarget).data(); insertMarkdownText({ |