Skip to content

Commit

Permalink
media files now also open in a new tab when clicked (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealDekkia committed Apr 15, 2024
1 parent 567edea commit 0273884
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion thread/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ const threadUnroll = {
if (status.media_attachments) {
status.media_attachments.forEach(media => {

var mediaBox = document.createElement("figure");
var mediaBox = document.createElement("a");
mediaBox.className = "statusBoxWrapper";
mediaBox.href = media.url;
mediaBox.target = "_blank";
mediaBox.rel = "noopener noreferrer";

var mediaContent = undefined;
if (media.type == "image") {
mediaContent = document.createElement("img");
Expand Down

0 comments on commit 0273884

Please sign in to comment.