JS in epub, in some cases, is essential. For example, to format poetry. Also, I use JS to add fleurons at the end of a chapter according to the "free space" between the last line of text in the chapter and the the end of the ereader screen. If the space is big, then a fleuron is added. JS detect is the size of the font has changed and, according to that, it can add fleurons where there was not any, and remove some others (because blank spaces have changed with the change of the font size). More over, it's possible to give with JS practically a full format to text coded only with html tags (all styles are applied by the script) althought I must say that I prefer to style "by hand". And also you can add hyphens with JS (hyphenator is pure javascript).
|