View Single Post
Old 04-02-2014, 03:55 PM   #596
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by Perkin View Post
the plugin was in the post here if you want to see what I did. [And see better than how it's worded here ]
If I grok that script correctly, it looks like I can expand it to remove the Kobo spans just by changing this line (23):

Code:
if entity == '<span>':
to this:

Code:
if entity == '<span>' or entity[:17] == '<span class="kobo' or entity[:15] == '<span id="kobo.':
In other words, match no-attribute spans, spans where the first attribute is a class beginning with 'kobo', and spans where the first attribute is an ID beginning with 'kobo.' - yes?

If that'll do the trick, it should match the Kobo books I've seen (class first), those PeterT's got (id first), and it'll strip out empty spans in the bargain. Not bad for one changed line...

ETA: Never mind; the further enhancement I had in mind wouldn't work. Ignore this ETA line.

Last edited by Rev. Bob; 04-02-2014 at 04:01 PM.
Rev. Bob is offline   Reply With Quote