X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fjs%2Fcomment-by-viewer.js;h=c255a10fc00bbe160e6a30dcf3bb8bcb636a4092;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=22d4b54561e42dfc78f9b964f0834d134901e689;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/comment/js/comment-by-viewer.js b/web/core/modules/comment/js/comment-by-viewer.js index 22d4b5456..c255a10fc 100644 --- a/web/core/modules/comment/js/comment-by-viewer.js +++ b/web/core/modules/comment/js/comment-by-viewer.js @@ -1,26 +1,17 @@ /** - * @file - * Attaches behaviors for the Comment module's "by-viewer" class. - */ +* DO NOT EDIT THIS FILE. +* See the following change record for more information, +* https://www.drupal.org/node/2815083 +* @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