about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-08-06 21:07:26 +0200
committerOndřej Hruška <ondra@ondrovo.com>2017-08-06 21:24:13 +0200
commit91836d577e1f02ffbeb417246ef13e211455a123 (patch)
tree3c88f745c397db2893dc7927504c8582a400a68d /app
parent7de0fa698dcdb6bd237b260fd42b1ce9bfc7191e (diff)
Add data-avatar-of="@..." to all user avatars
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/components/avatar.js1
-rw-r--r--app/javascript/mastodon/components/avatar_overlay.js4
2 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/components/avatar.js b/app/javascript/mastodon/components/avatar.js
index f7c484ee3..dd155f059 100644
--- a/app/javascript/mastodon/components/avatar.js
+++ b/app/javascript/mastodon/components/avatar.js
@@ -64,6 +64,7 @@ export default class Avatar extends React.PureComponent {
         onMouseEnter={this.handleMouseEnter}
         onMouseLeave={this.handleMouseLeave}
         style={style}
+        data-avatar-of={`@${account.get('acct')}`}
       />
     );
   }
diff --git a/app/javascript/mastodon/components/avatar_overlay.js b/app/javascript/mastodon/components/avatar_overlay.js
index f5d67b34e..2ecf9fa44 100644
--- a/app/javascript/mastodon/components/avatar_overlay.js
+++ b/app/javascript/mastodon/components/avatar_overlay.js
@@ -21,8 +21,8 @@ export default class AvatarOverlay extends React.PureComponent {
 
     return (
       <div className='account__avatar-overlay'>
-        <div className='account__avatar-overlay-base' style={baseStyle} />
-        <div className='account__avatar-overlay-overlay' style={overlayStyle} />
+        <div className='account__avatar-overlay-base' style={baseStyle} data-avatar-of={`@${account.get('acct')}`} />
+        <div className='account__avatar-overlay-overlay' style={overlayStyle} data-avatar-of={`@${friend.get('acct')}`} />
       </div>
     );
   }