diff options
author | JJfutbol <JJfutbol@d4e419ec-0920-11de-bbfd-a7c1bc4c261e> | 2009-07-10 00:57:39 +0000 |
---|---|---|
committer | JJfutbol <JJfutbol@d4e419ec-0920-11de-bbfd-a7c1bc4c261e> | 2009-07-10 00:57:39 +0000 |
commit | 90cf706688f8899b381e98008327b77a15b754ca (patch) | |
tree | 5a3a8ad5cefda89d93810f0e8f17254cef96da60 | |
parent | 39c3d23a79705caa7441a3cce47ed26ff9d7599b (diff) | |
download | readability-simple-90cf706688f8899b381e98008327b77a15b754ca.tar.bz2 readability-simple-90cf706688f8899b381e98008327b77a15b754ca.zip |
added pre styles to both css files
git-svn-id: http://arc90labs-readability.googlecode.com/svn/trunk@62 d4e419ec-0920-11de-bbfd-a7c1bc4c261e
-rwxr-xr-x | css/readability-print.css | 9 | ||||
-rwxr-xr-x | css/readability.css | 18 | ||||
-rwxr-xr-x | js/readability.js | 4 |
3 files changed, 19 insertions, 12 deletions
diff --git a/css/readability-print.css b/css/readability-print.css index 855e827..4aef7b6 100755 --- a/css/readability-print.css +++ b/css/readability-print.css @@ -1,6 +1,15 @@ #readInner { width: 100% !important; } +#readInner pre { + overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */ + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + /* width: 99%; */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} #readTools { display: none; } diff --git a/css/readability.css b/css/readability.css index d990766..746bbc3 100755 --- a/css/readability.css +++ b/css/readability.css @@ -9,7 +9,7 @@ } #readInner { line-height: 1.4em; - margin: 1em auto; + margin: 0 auto; max-width: 800px; text-align: left; width: 800px; @@ -28,22 +28,20 @@ line-height: 1.4em; overflow: auto; white-space: pre-wrap; -} +}*/ #readInner code, #readInner pre { font-family: "Courier New", Courier, monospace; } #readInner pre { - background-color: #FFF; - border: #000 1px inset; - font-size: 110%; - max-height: 250px; - overflow: auto; + font-size: 16px; + line-height: 1.2em; margin: 0; - padding: 6px 0; + max-height: 250px; + overflow: auto; overflow-x: auto; + padding: 5px 0; width: 100%; } -*/ #readInner * { background: none; border: none; @@ -145,7 +143,7 @@ font-weight: normal; } .style-newspaper { - background: #FFF; + background: #F7F7F7; color: #222; font-family: "Times New Roman", Times, serif; } diff --git a/js/readability.js b/js/readability.js index ce8fb52..be254df 100755 --- a/js/readability.js +++ b/js/readability.js @@ -82,7 +82,7 @@ function determineContentScore(score, parent, element) // TODO: should set as a global var since badKeywords are used elsewhere
var goodKeywords = ["article", "body", "content", "entry", "hentry", "post", "story", "text"];
var semiGoodKeywords = ["area", "container", "inner", "main"];
- var badKeywords = ["ad", "captcha", "classified", "clear", "comment", "footer", "footnote", "leftcolumn", "listing", "menu", "meta", "module", "nav", "navbar", "rightcolumn", "sidebar", "sponsor", "toolbar", "tools", "trackback", "widget"];
+ var badKeywords = ["ad", "captcha", "classified", "clear", "comment", "footer", "footnote", "leftcolumn", "listing", "menu", "meta", "module", "nav", "navbar", "rightcolumn", "sidebar", "sponsor", "tab", "toolbar", "tools", "trackback", "widget"];
// we'll be doing a case insensitive compare
var className = parent.className.toLowerCase();
@@ -469,7 +469,7 @@ function removeNonContentElement(element, tagName) var a = descendant.getElementsByTagName("a").length;
var embed = descendant.getElementsByTagName("embed").length;
- var badKeywords = ["ad", "captcha", "classified", "clear", "comment", "footer", "footnote", "leftcolumn", "listing", "menu", "meta", "module", "nav", "navbar", "rightcolumn", "sidebar", "sponsor", "toolbar", "tools", "trackback", "widget"];
+ var badKeywords = ["ad", "captcha", "classified", "clear", "comment", "footer", "footnote", "leftcolumn", "listing", "menu", "meta", "module", "nav", "navbar", "rightcolumn", "sidebar", "sponsor", "tab", "toolbar", "tools", "trackback", "widget"];
// should improve this but for if the element has a single bad keyword remove it
for (var j = 0; j < badKeywords.length; j++)
|