Fix text-autospace.js: Scope hanla Tags to Blog Content

Preface

Previously, I applied text-autospace.js to add spaces between Chinese and English, and I have kept using it until now; the display effect is quite good.

Today I wanted to have AI modify it so that it only takes effect in the main body of blog posts; it should not take effect in other parts of the page, such as gadgets.

AI analysis told me that this script adds hanla tags to the entire body element of the HTML.

What? (I was shocked; I had never thought about what this script was doing underneath. I only knew the final display effect by looking at it with my eyes.)


Confirm the current situation

Implemented according to the original project's instructions. (I have already implemented it, omitted)

Open a page in the browser, such as https://zelikk.blogspot.com/2026/09/chrome-edge-extension-maximize-video-button.html

F12 Developer Tools

On the Elements page, use Ctrl+F to search for hanla

As you can see, the script section has been inserted with hanla tags

I cannot imagine why, for so long before, my blog did not seem to have any problems when used.

Furthermore, if hanla tags are inserted inside h1, h2, h3, ... tags in the main body of blog posts, that is interfering information for programs such as crawlers and agents.


Fix the problem

Agent-oriented development

Hermes connects to the free public site agentrouter's deepseek-v4-flash

The following quote boxes are all natural language I sent to the Agent

* I only wrote the key requirement description information and omitted the test feedback information. This development was not a simple one-shot. I did not have the final effect in mind from the beginning either. I gradually clarified my requirements throughout the process.

你改一份 新的