Linux.do Forum Auto-Replace Domain with Tampermonkey

Preface

On the Linux.do forum, when creating a post,
if the post contains links to external sites, the moderation rules require that those external site pages must link back to the Linux.do forum.
If the post contains a GitHub link, the moderation rules require that the project's homepage README.md link back to the Linux.do forum.
Forum system feedback: need to add friend links in project README.md

Approach

When publishing, replace your own blog domain in the post body with Follow Forum Guidelines. For example:
Initializing wiki page: discussing full RSS output for the site with hermes

After successfully publishing, when browsing the page, use a Tampermonkey script to replace Follow Forum Guidelines with the user's website domain.
crazypeace profile page showing ghproxy modification script and blog link

The final effect is
Initializing wiki page: discussing the zelikk blog RSS with hermes

Github


Demo

You can install the Tampermonkey script above and open this post to see the effect.

Development Process

At first, I thought this was about developing a Tampermonkey script based on web pages, so I used Antigravity.
But I ran into some issues. 
Antigravity kept saying the model was busy from time to time and returned nothing. 
I switched between different models, and finally managed to complete the first version with Gemini-3-flash, though it was a bumpy ride

My initial idea was to click on the OP's avatar on the page, and in the pop-up box that appears, find the website domain
crazypeace profile page with message button and highlighted blog link

The script content is quite complex — it needs to perform a click, then wait for the pop-up box to display its content, and then extract the desired field.

After producing the first version, I sent the script to the web version of ChatGPT and asked what could be improved.
I got some really good improvement suggestions.
Based on the Discourse forum, if you want to get a user's information, you can access  /u/{username}.json 
The final version of the script is clear and concise.

========
update
Added
G station replaced with https://github.com

Screenshot of Caddy reverse proxy config and Xray install commands

Screenshot of Caddyfile reverse proxy and Reality server setup tutorial

Comments