View Single Post
Old 05-30-2021, 08:16 PM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
If you want to play around with Bibi and javscripts, you will need to search the bibi folder inside the plugin for a file called defaults.js.

Here is a link to it on github:

https://github.com/Sigil-Ebook/BibiR...ets/default.js

Near the end of that file you will see:
Code:
/* !!!! BE CAREFUL !!!! */ "allow-scripts-in-content" : false, // true or false (false is recommended).
// If you change its value `true`, Bibi does not remove scripts natively-included in EPUB.
// It makes Bibi to be able to open EPUBs including useful scripts.
// But on the other hand, it may also allow XSS of malicious EPUB in some cases.
There are other settings in that file that control what happens when you grow the window too wide and many other useful things.

Changing that file in the plugin should allow you to use your hyphenator and control layout a bit better.

Hope this helps.

KevinH

Quote:
Originally Posted by RbnJrg View Post
Sometimes, when I want to see how the hyphens could affect a text (and when to avoid them or where disable them), I use the lybrary Hyphenator.js. Sigil supports it very well (even in epub2) and the Preview panel shows hyphens very well.

Of course, I don't include in my epubs (even in epub3) the .js lybrary (because epub2 doesn't support it and for epub3, the ereaders have the feature to hyphen the text) but for that very reason, it's quite a nuisance first to add the lybrary to watch the probably output and then remove it.

But now, that you Kevin and Diap have implemented three plugins as viewers, I'm wondering if wouldn't be possible add the Hyphenator.js lybrary to them (the user could have the option to enable or disable it). By the way, BibiReader seems not to support javascripts.

Many thanks for your considerations.
KevinH is offline   Reply With Quote