Skip to content

Commit

Permalink
Modify lightbox to only display valid images and YT Videos.
Browse files Browse the repository at this point in the history
This modifies the lightbox to only display images inside the
".message_inline_image" class, rather than all images inside the
message body, which currently includes things like the bot icon.
  • Loading branch information
Brock Whittaker authored and showell committed Mar 25, 2017
1 parent b3e4aa4 commit efd72d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var asset_map = {

function render_lightbox_list_images(preview_source) {
if (!is_open) {
var images = Array.prototype.slice.call($(".focused_table .messagebox-content img"));
var images = Array.prototype.slice.call($(".focused_table .message_inline_image img"));
var $image_list = $("#lightbox_overlay .image-list").html("");

images.forEach(function (img) {
Expand Down

0 comments on commit efd72d3

Please sign in to comment.