summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/readability.js23
1 files changed, 1 insertions, 22 deletions
diff --git a/js/readability.js b/js/readability.js
index 383dd0d..869fcad 100755
--- a/js/readability.js
+++ b/js/readability.js
@@ -14,7 +14,6 @@ if (typeof console == 'undefined')
};
}
-(function(){
// some sites use plugins (jCarousel) that when Readability removes scripts
// or does something funky it causes an alert to appear every few seconds,
// to avoid this we'll override the alert and timer methods, we won't need
@@ -26,23 +25,10 @@ if (typeof console == 'undefined')
var overlayContainer = document.createElement("DIV");
var articleTitle = document.createElement("H1");
var contentContainer = document.createElement("DIV");
- var articleFooter = document.createElement("DIV");
- var toolBar = document.createElement("DIV");
overlayContainer.id = "readOverlay";
contentContainer.id = "readInner";
- // apply user-selected styling
- document.body.className = readStyle;
- overlayContainer.className = readStyle;
- contentContainer.className = readMargin + " " + readSize;
-
- // set up the toolbar widget
- toolBar.id = "readTools";
- toolBar.innerHTML = '<a href="#" onclick="window.location.reload();return false;" title="Reload original page" id="reload-page">Reload Original Page</a>' +
- '<a href="#" onclick="javascript:window.print();return false;" title="Print page" id="print-page">Print Page</a>' +
- '<a href="#" onclick="emailBox();return false;" title="Email page" id="email-page">Email Page</a>';
-
// we'll use the page title as our title, unfortunately not all sites use
// this well, so we might want to consider say stripping an H1 tag
articleTitle.innerHTML = document.title;
@@ -51,13 +37,7 @@ if (typeof console == 'undefined')
// parse the article content and add it to the new content container
contentContainer.appendChild(parseContent());
- // add the footer and contents
- articleFooter.id = "readFooter";
- articleFooter.innerHTML = '<div><a href="http://lab.arc90.com/experiments/readability/"><img src="http://lab.arc90.com/experiments/readability/images/footer-readability.png" width="201" height="66" /></a><a href="http://www.arc90.com/"><img src="http://lab.arc90.com/experiments/readability/images/footer-arc90.png" width="108" height="66" /></a></div><div><a href="http://www.twitter.com/arc90" class="footer-twitterLink">Follow us on Twitter &raquo;</a></div><div id="readability-version">' + readabilityVersion + '</div>';
- contentContainer.appendChild(articleFooter);
-
// add the toolbar and then the conent container to our body
- overlayContainer.appendChild(toolBar);
overlayContainer.appendChild(contentContainer);
// for totally hosed HTML, add body node that can"t be found because of bad HTML or something
@@ -69,7 +49,6 @@ if (typeof console == 'undefined')
// with all previous body content removed, add our new overlay/main container
document.body.insertBefore(overlayContainer, document.body.firstChild);
-})();
function determineContentScore(score, parent, element)
@@ -761,4 +740,4 @@ function removeStylesheets()
function trim(text)
{
return (text || "").replace(/^\s+|\s+$/g, "");
-} \ No newline at end of file
+}