thumbnail: Show play button on hovering youtube thumbnail.

This PR adds a play icon on hovering the youtube thumbnails.
Also, shows the pointer cursor on vimeo videos instead of
zoom-in.
This commit is contained in:
Akash Nimare
2018-09-30 17:22:38 +05:30
committed by Tim Abbott
parent c0df049a18
commit da7adb038f
2 changed files with 24 additions and 0 deletions

View File

@@ -150,6 +150,14 @@ function initialize_kitchen_sink_stuff() {
row.removeClass("sender_name_hovered");
});
$("#main_div").on("mouseenter", ".youtube-video a", function () {
$(this).addClass("fa fa-play");
});
$("#main_div").on("mouseleave", ".youtube-video a", function () {
$(this).removeClass("fa fa-play");
});
$("#subscriptions_table").on("mouseover", ".subscription_header", function () {
$(this).addClass("active");
});

View File

@@ -2225,6 +2225,11 @@ div.floating_recipient {
cursor: zoom-in;
}
.youtube-video img,
.vimeo-video img {
cursor: pointer;
}
.rtl .twitter-image img,
.rtl .message_inline_image img,
.rtl .message_inline_ref img {
@@ -2241,6 +2246,17 @@ li .message_inline_image img {
float: none;
}
.youtube-video .fa-play::before {
position: absolute;
margin: 32px 0 0 45px;
padding: 5px 8px 5px 10px;
font-size: 12px;
border-radius: 4px;
background: hsl(0, 0%, 0%);
color: hsl(0, 0%, 100%);
opacity: 0.7;
}
.message_inline_image_title {
font-weight: bold;
}