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 | |
parent | 0b7ae8eef99107554a5a780618dff9f8475af3a6 (diff) |
Count <br><br> as <p>, and unset any background image
-rw-r--r-- | TODO | 4 | ||||
-rwxr-xr-x | simplyread.js | 3 |
2 files changed, 2 insertions, 5 deletions
@@ -1,7 +1,3 @@ -core: - consider counting <br />\s<br \> as a <p> as least some blogspot pages need it - http://davidz25.blogspot.com/2011/06/writing-c-library-part-1.html - chromium: generate appid for use in update xml see GenerateId in extension.cc of chrome for how it works 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;" + |