summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/comment/js/comment-by-viewer.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/comment/js/comment-by-viewer.js')
-rw-r--r--core/modules/comment/js/comment-by-viewer.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/comment/js/comment-by-viewer.js b/core/modules/comment/js/comment-by-viewer.js
index c255a10fc00b..3f47ceeaab27 100644
--- a/core/modules/comment/js/comment-by-viewer.js
+++ b/core/modules/comment/js/comment-by-viewer.js
@@ -7,11 +7,12 @@
(function ($, Drupal, drupalSettings) {
Drupal.behaviors.commentByViewer = {
- attach: function attach(context) {
- var currentUserID = parseInt(drupalSettings.user.uid, 10);
+ attach(context) {
+ const currentUserID = parseInt(drupalSettings.user.uid, 10);
$('[data-comment-user-id]').filter(function () {
return parseInt(this.getAttribute('data-comment-user-id'), 10) === currentUserID;
}).addClass('by-viewer');
}
+
};
})(jQuery, Drupal, drupalSettings); \ No newline at end of file