Hacker News new | past | comments | ask | show | jobs | submit login

Nowadays reddit hides it, I use this to revert back to full url

    for (let value of document.querySelectorAll('.first a.bylink.comments')) {
     let href = value.closest('.top-matter').querySelector('.title a.title.may-blank').href;
     if (href != value.href && (
      href.startsWith('https://www.reddit.com/') ||
      href.startsWith('https://v.redd.it'))
        ) {
      console.log (href, value.href);
      value.closest('.top-matter').querySelector('.title a.title.may-blank').href = value.href;
     }
    }



What do you mean the hide it now? I still see it in the URL?


This is what I see https://v.redd.it/pzma14ni23vc1 for post titles, while comment link https://www.reddit.com/r/UkraineWarVideoReport/comments/1c6h...

First one is also dynamic, so next ~day its different breaking one of the fundamental features of HTML - :visited link color.


Saying they hide it might be a bit of a stretch, that URL just 302's to the comment link with the title-in-url as usual. I guess you're referring to being able to right-click and copy the url directly?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: