comment-by-viewer.js 546 B

1234567891011121314151617
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function ($, Drupal, drupalSettings) {
  8. Drupal.behaviors.commentByViewer = {
  9. attach: function attach(context) {
  10. var currentUserID = parseInt(drupalSettings.user.uid, 10);
  11. $('[data-comment-user-id]').filter(function () {
  12. return parseInt(this.getAttribute('data-comment-user-id'), 10) === currentUserID;
  13. }).addClass('by-viewer');
  14. }
  15. };
  16. })(jQuery, Drupal, drupalSettings);