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.
When publishing, replace your own blog domain in the post body with Follow Forum Guidelines. For example:
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
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