for what it's worth i think it's pretty cool. if i understand right i can use it for example to change all links from dead site to archive.org, or from youtube.com to my favorite invidious instance.
(i also echo your sentiment that JS is deeply flawed :))