Even if you publish the source code people won't be able to know what you publish is actually being used on your website. We will also don't know if you change anything later. That's why I say a tampermonkey script would be a good way to build something like this.
It would at least be reproducible and verifiable. Right now this is all based on Trust. Who guarantees it does not have a code that maliciously, selectively replaces Addresses published on profiles of particular Members with Addresses OP wants?