diff options
author | Nick White <git@njw.me.uk> | 2011-08-14 21:00:00 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-08-14 21:00:00 +0100 |
commit | 69cad105fa23055a794b32e611ef7cf543013bb7 (patch) | |
tree | 9eefddd84606cfb22753785209d76cabf5522503 /simplyread.js | |
parent | 0b7ae8eef99107554a5a780618dff9f8475af3a6 (diff) |
Count <br><br> as <p>, and unset any background image
Diffstat (limited to 'simplyread.js')
-rwxr-xr-x | simplyread.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/simplyread.js b/simplyread.js index dff7019..60a96c2 100755 --- a/simplyread.js +++ b/simplyread.js @@ -31,6 +31,7 @@ function simplyread() } doc.simplyread_original = doc.body.innerHTML; + doc.body.innerHTML = doc.body.innerHTML.replace(/<br[^>]*>\s*<br[^>]*>/g, "<p>"); var biggest_num = 0; var biggest_tag; @@ -61,7 +62,7 @@ function simplyread() doc.body.innerHTML = "<style type=\"text/css\"> p{margin:0ex auto;}" + - " p+p{text-indent:2em;} body {background-color:#cccccc}" + + " p+p{text-indent:2em;} body {background:#cccccc none}" + " img{display:block; max-width: 32em; padding:1em; margin:auto;}" + " h1,h2,h3,h4 {font-weight:normal}</style>" + "<div style=\"width:34em; padding:8em; padding-top:2em;" + |