| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Local modifications to this file are described in the README.chromium | 5 // Local modifications to this file are described in the README.chromium |
| 6 // file. | 6 // file. |
| 7 | 7 |
| 8 var dbg = (typeof console !== 'undefined') ? function(s) { | 8 var dbg = (typeof console !== 'undefined') ? function(s) { |
| 9 console.log("Readability: " + s); | 9 console.log("Readability: " + s); |
| 10 } : function() {}; | 10 } : function() {}; |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 } | 1737 } |
| 1738 }; | 1738 }; |
| 1739 | 1739 |
| 1740 // Extracts long-form content from a page and returns and array where the first | 1740 // Extracts long-form content from a page and returns and array where the first |
| 1741 // element is the article title, the second element is HTML containing the | 1741 // element is the article title, the second element is HTML containing the |
| 1742 // long-form content, and remaining elements are URLs for images referenced by | 1742 // long-form content, and remaining elements are URLs for images referenced by |
| 1743 // that HTML. Each <img> tag in the HTML has an id field set to k - 2, which | 1743 // that HTML. Each <img> tag in the HTML has an id field set to k - 2, which |
| 1744 // corresponds to a URL listed at index k in the array returned. | 1744 // corresponds to a URL listed at index k in the array returned. |
| 1745 (function () { | 1745 (function () { |
| 1746 readability.init(); | 1746 readability.init(); |
| 1747 var result = new Array(3); | 1747 var result = new Array(4); |
| 1748 result[0] = readability.getArticleTitle(); | 1748 result[0] = readability.getArticleTitle(); |
| 1749 result[1] = readability.getDistilledArticleHTML(); | 1749 result[1] = readability.getDistilledArticleHTML(); |
| 1750 result[2] = readability.getNextPageLink(); | 1750 result[2] = readability.getNextPageLink(); |
| 1751 // TODO(shashishekhar): Add actual previous page link here. |
| 1752 result[3] = ''; |
| 1751 return result.concat(readability.getImages()); | 1753 return result.concat(readability.getImages()); |
| 1752 }()) | 1754 }()) |
| 1753 | 1755 |
| OLD | NEW |