Okay, I got no error because it was not running at all due to a typo I had locally (I was working on a v030 version). Once I reverted to the posted v0.2.0 version I see 6 blank pages with your test case.
In Sigil, I edited Section0001.xhtml and added the following line:
<script src="../Misc/en-us.js" type="text/javascript"></script>
immediately after this line:
<script src="../Misc/Hyphenator.js" type="text/javascript"></script>
And relaunched BibiReader. It showed all 6 pages with hyphenation enabled.
My guess is Bibi will still strip out any unused js files even with that default.js change.
That said, most browsers require a script tag before it will load any js code into memory before it can be used. I see in the Hyphenator code the load patterns routine where you made the change. It literally builds a script tag if it can find the en-us.js file and adds it to the DOM.
Are you sure basePath ends with a "/"?
If it tries to use xhr to load it instead it may run into cross site scripting restrictions. Also I did not see Chrome listed as a supported Browser in any of the Hyphenator.js code I looked at but I only skimmed it.
Hope this helps,
KevinH
Last edited by KevinH; 06-02-2021 at 06:20 PM.
|