Mercurial > hg > isophonics-drupal-site
view core/modules/comment/js/comment-by-viewer.js @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
/** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal, drupalSettings) { Drupal.behaviors.commentByViewer = { 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'); } }; })(jQuery, Drupal, drupalSettings);