diff --git a/lib/readability.js b/lib/readability.js index 44341c3..8e15815 100644 --- a/lib/readability.js +++ b/lib/readability.js @@ -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, @@ -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; @@ -2133,6 +2147,8 @@ function start(w, cb) { readability.init(); MyProfiler.report(); + + removeReadabilityArtifacts(); //dbg('[Readability] done'); cb(document.body.innerHTML);