You can do it with Javascript. This one is for the link to get a random post on my site.
/* Javascript for Random post Glitch app */
var a = document.querySelector('a[href="https://journal.dinobansigan.com/random"]');
if (a) {
a.setAttribute('href', 'https://random-journal-post.glitch.me/get');
a.setAttribute('title', 'Get a random post');
}
var b = document.querySelector('a[href="/dino/random"]');
if (b) {
b.setAttribute('href', 'https://random-journal-post.glitch.me/get');
b.setAttribute('title', 'Get a random post');
}