Formulation of the problem
When opening sites in the browser, you need to pre-process the content and, changing the content of the page, show it in the browser. That is, everything happens at the client, and not on the server.
Example
Find a specific text on the page and select it with a frame or indicate with an arrow.
Additional terms
The code that processes the content is in the external application. Let's say C ++. That is, I would like to somehow transfer the data to the application (via the file?) And after receiving the updated page, show it to the user. Suppose that the browser FireFox, although it may well be that it does not matter. OS - Windows.
My solution
WebExtensions / upload to file / upload response / page substitution. I'm not sure yet that this is realizable and that the API is enough.
Alternative
Make some kind of proxy, where to do all this, but I do not know which one. If I had the opportunity in WinAPI to write a hook to intercept the html-text and the possibility of its replacement - this would be probably the easiest solution for me.
Question
What is the easiest way to solve this problem?
I would be grateful if you point out an example.