4

Is there a trick to showing links to answers? I notice that they all have a distinct id, so it’s 90% in place already. Sometimes it would be helpful link to an answer rather than a question.

I have a little JavaScript which will do this from the console:

var answers=document.querySelectorAll('div[id^="answer-"]');
answers.forEach(answer=>{
    var a=document.createElement('a');
    a.href=`#${answer.getAttribute('id')}`;
    a.innerHTML='👀';
    answer.insertAdjacentElement('afterbegin',a);
});

and it’s not hard to turn that into a bookmarklet or an addon, but it seems that it should be an existing feature.

1 Answer 1

6

You just use the share link from the answer itself

gif screenshot of the process of getting the share link of an answer

1
  • 1
    The final /1234567 is your own user ID which allows Stack to keep track of how many times a URL was shared via a link you posted somewhere. This can occasionally be useful, but I often trim it off. (You get a friendly but somewhat obscure badge when enough people click on the same link. It doesn't show where you shared the link, only where the link took people.)
    – tripleee
    Commented Aug 14, 2020 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .