From 014c69513f913fef6147a2c6664e17845724f3db Mon Sep 17 00:00:00 2001 From: umbrae Date: Tue, 10 Mar 2009 20:41:26 +0000 Subject: Make sure we only initialize body's readability object once. git-svn-id: http://arc90labs-readability.googlecode.com/svn/trunk@22 d4e419ec-0920-11de-bbfd-a7c1bc4c261e --- js/readability.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/readability.js b/js/readability.js index 64abcdc..fe2e3bb 100755 --- a/js/readability.js +++ b/js/readability.js @@ -7,7 +7,9 @@ var readabilityVersion = "0.3"; objOverlay.id = "readOverlay"; objinnerDiv.id = "readInner"; - document.body.readability = {"contentScore": 0, originalHTML: document.body.innerHTML.toString()}; + // If we've already called readability once, leave the original content there. + if(typeof document.body.readability == 'undefined') + document.body.readability = {"contentScore": 0, originalHTML: document.body.innerHTML.toString()}; // Apply user-selected styling: document.body.className = readStyle; -- cgit v1.2.3