View Single Post
Old 11-06-2016, 09:03 PM   #1605
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,031
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New test version (direct link)

2016-11-06
- Adding remove_spoilers and legend_spoilers features and css example for spoilers for base_xenforoforum.
- Bump test version.

The way spoilers from the base_xenforoforum sites come out in ebook was bugging me. And rather than come up with one fix, I made three.

The CSS way is the least intrusive; legend_spoilers changes the HTML and uses a nice looking trick I first saw in Who Needs Enemies; remove_spoilers removes them outright.

And using story URL INI sections, you can change the settings for individual stories.

Code:
[base_xenforoforum]
...
## base_xenforoforum sites sometimes have 'spoiler' blocks in
## posts. When viewed in a browser, the block is hidden until a button
## is clicked.  eBook viewers can't handle that and the javascript is
## disabled.  The remove_spoilers option, if uncommented, will remove
## spoiler blocks entirely.
#remove_spoilers:true

## This option if uncommented, will put a box around the spoiler
## blocks with the original spoiler button text as a label using
## fieldset and legend HTML tags.  For a simple box, see the
## add_to_output_css example for [base_xenforoforum:epub] below.
#legend_spoilers:true

[base_xenforoforum:epub]
## See remove_spoilers above for more about 'spoilers'.  This example
## shows how to put a simple line around spoiler blocks.  Uncomment
## all three lines, keep the leading space before .bbCodeSpoilerContainer.
#add_to_keep_html_attrs:,style
#add_to_output_css:
# .bbCodeSpoilerContainer { border: 1px solid black; padding: 2px; }
JimmXinu is offline   Reply With Quote