Skip to content

Commit

Permalink
fix inline style collection (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasGollenstede committed Jan 20, 2019
1 parent 18f9cde commit 2c39ef8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# ePub Creator -- create ePubs from web pages and `overdrive.com`s online reader

<!-- This section can be copied as the AMO listing. -->

ePub creator allows you to save web pages opened in the browser as offline ePub e-books.
It currently supports:<ul>
<li> books opened in the online reader of the library service <a href="https://www.overdrive.com/">overdrive.com</a> </li>
<li> any web page opened in Firefox's Reader Mode </li>
<li> any web page that can be opened in Firefox's Reader Mode </li>
</ul>

<b>Instructions:</b>
Expand Down
3 changes: 2 additions & 1 deletion common/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const model = {
},
collectStyles: {
title: `Keep style information`,
description: `If enabled, some style information are extracted. Some readers won't be able to change the font size when styles are set.`,
description: `If enabled, some style information are extracted, but some readers won't be able to change the font settings when styles are set.
Only applies to <code>overdrive.com</code>, reader mode always removes all styles.`,
default: false,
input: { type: 'boolean', },
},
Expand Down
2 changes: 1 addition & 1 deletion content/collect/overdrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const chapters = (await Promise.all(bData.spine.map(async ({
.underline { text-decoration: underline; }
.bold { font-weight: bold; }
` );
options.styles && (css += Array.from(styles, ([ index, style, ]) => `\t\t.inline-${index} { ${style} }\n`).join(''));
options.styles && (css += Array.from(styles, ([ style, index, ]) => `\t\t.inline-${index} { ${style} }\n`).join(''));

// html clean-up
document.documentElement.setAttribute('xmlns', "http://www.w3.org/1999/xhtml");
Expand Down

0 comments on commit 2c39ef8

Please sign in to comment.