These are the steps:
1. install EB from scratch (or delete config.xml to force EB to recreate)
2. in default config, change only the start page (I used google.com) and path to CustomDOMElements tags file (tags.txt in my case)
5. start EB and browse a few pages, everything should be working fine, for every page an alert should show up
6. put the device to sleep by pressing Power button and wake it up after a few seconds (or you can wait for display timeout)
7. now browse a few pages again
In my case, at this step, I got 2 to 15 (or more) alerts for every page. At first, I though that after every sleep, one alert is added, but I left the device in sleep for about a minute and after wake up, I got 15 alerts for every page.
Finally I turned on debug mode in EB and checked the source in Chrome developer tools. I noticed, that after initial EB startup, only one "script code" is added into HEAD section using DOM injection. But when I sleep/wake device and reload a page, "script code" is multiplied in the source code. Like this:
The number of multiplications stays the same for every page, until I sleep the device again. Then the code is multiplied even more times. When you restart EB, it will start from one again.
I use TC8000 with latest OS patch (Lollipop) and EB 184.108.40.206. I tried two TC8000s and TC56 (Marshmallow) with the same results. I also tried EB 1.6, again with the same results.
This is all I was able to gather I work with EB only for a short time so I guess I could easily make some mistake or forgot something. I tried to find an answer on techdocs at first, but I was not lucky. I also attached abovementioned files including config.xml and log.txt (enabled log for everything).
I would appreciate any help to solve the situation.
Thank you very much in advance.