diff options
author | Alex Pott <alex.a.pott@googlemail.com> | 2017-05-19 23:12:53 +0100 |
---|---|---|
committer | Alex Pott <alex.a.pott@googlemail.com> | 2017-05-19 23:12:53 +0100 |
commit | 8287017e034bc323dec1d86b3f37a804aa082d2d (patch) | |
tree | ebd8ff908859b0e1cc4319392da94e8f68033321 /core/modules/comment/js/comment-by-viewer.js | |
parent | 9a0e9a649ac8078ce6e5f6089749a1115bdda06b (diff) | |
download | drupal-8287017e034bc323dec1d86b3f37a804aa082d2d.tar.gz drupal-8287017e034bc323dec1d86b3f37a804aa082d2d.zip |
Issue #2818825 by drpal, nod_, droplet, cilefen: Rename all JS files to *.es6.js and compile them
Diffstat (limited to 'core/modules/comment/js/comment-by-viewer.js')
-rw-r--r-- | core/modules/comment/js/comment-by-viewer.js | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/core/modules/comment/js/comment-by-viewer.js b/core/modules/comment/js/comment-by-viewer.js index 22d4b54561e..360ab3bfcfc 100644 --- a/core/modules/comment/js/comment-by-viewer.js +++ b/core/modules/comment/js/comment-by-viewer.js @@ -1,26 +1,21 @@ /** - * @file - * Attaches behaviors for the Comment module's "by-viewer" class. - */ +* DO NOT EDIT THIS FILE. +* All changes should be applied to ./modules/comment/js/comment-by-viewer.es6.js +* See the following change record for more information, +* https://www.drupal.org/node/2873849 +* @preserve +**/ (function ($, Drupal, drupalSettings) { 'use strict'; - /** - * Add 'by-viewer' class to comments written by the current user. - * - * @type {Drupal~behavior} - */ Drupal.behaviors.commentByViewer = { - attach: function (context) { + attach: function attach(context) { var 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'); + $('[data-comment-user-id]').filter(function () { + return parseInt(this.getAttribute('data-comment-user-id'), 10) === currentUserID; + }).addClass('by-viewer'); } }; - -})(jQuery, Drupal, drupalSettings); +})(jQuery, Drupal, drupalSettings);
\ No newline at end of file |