diff options
Diffstat (limited to 'core/modules/comment/js')
-rw-r--r-- | core/modules/comment/js/comment-by-viewer.es6.js | 4 | ||||
-rw-r--r-- | core/modules/comment/js/comment-new-indicator.es6.js | 4 | ||||
-rw-r--r-- | core/modules/comment/js/node-new-comments-link.es6.js | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/core/modules/comment/js/comment-by-viewer.es6.js b/core/modules/comment/js/comment-by-viewer.es6.js index de24038187aa..261c818192ac 100644 --- a/core/modules/comment/js/comment-by-viewer.es6.js +++ b/core/modules/comment/js/comment-by-viewer.es6.js @@ -3,7 +3,7 @@ * Attaches behaviors for the Comment module's "by-viewer" class. */ -(function($, Drupal, drupalSettings) { +(function ($, Drupal, drupalSettings) { /** * Add 'by-viewer' class to comments written by the current user. * @@ -13,7 +13,7 @@ attach(context) { const currentUserID = parseInt(drupalSettings.user.uid, 10); $('[data-comment-user-id]') - .filter(function() { + .filter(function () { return ( parseInt(this.getAttribute('data-comment-user-id'), 10) === currentUserID diff --git a/core/modules/comment/js/comment-new-indicator.es6.js b/core/modules/comment/js/comment-new-indicator.es6.js index 38647ed0eb8b..ee6420cf8a2f 100644 --- a/core/modules/comment/js/comment-new-indicator.es6.js +++ b/core/modules/comment/js/comment-new-indicator.es6.js @@ -6,7 +6,7 @@ * installed. */ -(function($, Drupal, window) { +(function ($, Drupal, window) { /** * Processes the markup for "new comment" indicators. * @@ -72,7 +72,7 @@ const $placeholders = $(context) .find('[data-comment-timestamp]') .once('history') - .filter(function() { + .filter(function () { const $placeholder = $(this); const commentTimestamp = parseInt( $placeholder.attr('data-comment-timestamp'), diff --git a/core/modules/comment/js/node-new-comments-link.es6.js b/core/modules/comment/js/node-new-comments-link.es6.js index d3d0a0787078..6d6aa600723b 100644 --- a/core/modules/comment/js/node-new-comments-link.es6.js +++ b/core/modules/comment/js/node-new-comments-link.es6.js @@ -6,7 +6,7 @@ * installed. */ -(function($, Drupal, drupalSettings) { +(function ($, Drupal, drupalSettings) { /** * Hides a "new comment" element. * @@ -113,7 +113,7 @@ * Data about new comment links indexed by nodeID. */ function render(results) { - Object.keys(results || {}).forEach(nodeID => { + Object.keys(results || {}).forEach((nodeID) => { if ($placeholdersToUpdate.hasOwnProperty(nodeID)) { $placeholdersToUpdate[nodeID] .attr('href', results[nodeID].first_new_comment_link) @@ -160,7 +160,7 @@ const $placeholders = $(context) .find('[data-history-node-last-comment-timestamp]') .once('history') - .filter(function() { + .filter(function () { const $placeholder = $(this); const lastCommentTimestamp = parseInt( $placeholder.attr('data-history-node-last-comment-timestamp'), |