File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " xlog " : patch
3+ ---
4+
5+ Display shorts images normally.
Original file line number Diff line number Diff line change @@ -61,9 +61,15 @@ export const javaScriptContentLoaded = (
6161
6262 function handleImageClick(event) {
6363 event.preventDefault();
64- const clickedImageUrl = event.target.dataset.src;
65- const images = document.getElementsByTagName('img');
66- const allImageUrls = Array.from(images).map(img => img.dataset.src);
64+ const isAvatar = img => img.width === 32 && img.height === 32;
65+
66+ if (isAvatar(event.target)) {
67+ return false;
68+ }
69+
70+ const clickedImageUrl = event.target.src || event.target.dataset.src;
71+ const images = Array.from(document.getElementsByTagName('img')).filter(img => !isAvatar(img));
72+ const allImageUrls = Array.from(images).map(img => img.src || img.dataset.src);
6773 const imageUrlSet = new Set([clickedImageUrl, ...allImageUrls]);
6874 const imageUrlArray = Array.from(imageUrlSet);
6975
You can’t perform that action at this time.
0 commit comments