]> cat aescling's git repositories - mastodon.git/commitdiff
Add title attribute to URLs in statuses (#1755)
authorLuc Didry <ldidry@users.noreply.github.com>
Fri, 14 Apr 2017 11:22:56 +0000 (13:22 +0200)
committerEugen <eugen@zeonfederated.com>
Fri, 14 Apr 2017 11:22:56 +0000 (13:22 +0200)
Since URLs in statuses are truncated, it would be pleasant to see the
full URL when hovering the URL (like on twitter, yes).

app/assets/javascripts/components/components/status_content.jsx

index c7eefcaf508fd00080f5b5910251d6aaf16d899b..33e407e43149535be10b3d875e9ffdb79b05209e 100644 (file)
@@ -44,6 +44,7 @@ const StatusContent = React.createClass({
       } else {
         link.setAttribute('target', '_blank');
         link.setAttribute('rel', 'noopener');
+        link.setAttribute('title', link.href);
       }
     }
   },