Mercurial > hg > cmmr2012-drupal-site
view core/modules/comment/js/comment-by-viewer.js @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | c75dbcec494b |
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);