Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Make thumbnails clickable #174

Open
DivvyPT opened this issue Mar 4, 2023 · 1 comment
Open

[Feature Request]: Make thumbnails clickable #174

DivvyPT opened this issue Mar 4, 2023 · 1 comment

Comments

@DivvyPT
Copy link

DivvyPT commented Mar 4, 2023

Hello guys, is there any way to make thumbnails clickable?
I think that would be a great feature!

@ryanhilton
Copy link

Hey @DivvyPT, as a quick workaround, I added this JS to grab the favorite link, and then wrap the thumbnail image with it.

document.addEventListener('DOMContentLoaded', (event) => {

  let anchorLinks = document.querySelectorAll(".favorites-list p:nth-child(2) > a");
  
  anchorLinks.forEach((anchorLink) => {
      let image = anchorLink.parentNode.previousElementSibling.querySelector("img");
  
      let imageWrappedAnchor = document.createElement("a");
      imageWrappedAnchor.setAttribute("href", `${anchorLink.href}`);
      imageWrappedAnchor.appendChild(image);
  
      anchorLink.parentNode.previousElementSibling.appendChild(imageWrappedAnchor);
  });

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants