Is it possible to change an already created link from a previous note with js?

We’ve touched in on this subject lately, and two of my responses with almost the same answer is given below. The trick is to defer showing the previous/next links until you show the note. This way you don’t need to change a link in an existing note, but just let the note itself discover which is the previous and next links.