Skip to content

Commit

Permalink
Merge branch 'debugoff'
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan51 committed Dec 20, 2010
2 parents afec8c8 + 235681d commit fa150e3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/readability.js
Expand Up @@ -19,7 +19,7 @@ var dbg = (typeof console !== 'undefined') ? function(s) {
**/
var readability = {
version: '1.7.1',
debugging: true,
debugging: false,
emailSrc: 'http://lab.arc90.com/experiments/readability/email.php',
iframeLoads: 0,
convertLinksToFootnotes: false,
Expand Down Expand Up @@ -2117,6 +2117,20 @@ function timed() {

})();

function removeReadabilityArtifacts() {
var titleContainer = document.getElementById('article-title');
if (null !== titleContainer) {
document.title = titleContainer.innerHTML;
}

var contentContainer = document.getElementById('readability-content');
if (null !== contentContainer) {
document.body.innerHTML = contentContainer.innerHTML;
}

console.log(document.body.innerHTML);
}

function start(w, cb) {
window = w;
document = w.document;
Expand All @@ -2133,6 +2147,8 @@ function start(w, cb) {
readability.init();

MyProfiler.report();

removeReadabilityArtifacts();

//dbg('[Readability] done');
cb(document.body.innerHTML);
Expand Down

0 comments on commit fa150e3

Please sign in to comment.