| 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 // These includes will be processed at build time by grit. | 5 // These includes will be processed at build time by grit. |
| 6 <include src="../../../../third_party/dom_distiller_js/package/js/domdistiller.j
s"/> | 6 <include src="../../../../third_party/dom_distiller_js/js/domdistiller.js"/> |
| 7 | 7 |
| 8 // Extracts long-form content from a page and returns an array where the first | 8 // Extracts long-form content from a page and returns an array where the first |
| 9 // element is the article title, the second element is HTML containing the | 9 // element is the article title, the second element is HTML containing the |
| 10 // long-form content, the third element is the next page link, and the fourth | 10 // long-form content, the third element is the next page link, and the fourth |
| 11 // element is the previous page link. | 11 // element is the previous page link. |
| 12 (function() { | 12 (function() { |
| 13 var result = new Array(4); | 13 var result = new Array(4); |
| 14 try { | 14 try { |
| 15 result[0] = com.dom_distiller.DocumentTitleGetter.getDocumentTitle( | 15 result[0] = com.dom_distiller.DocumentTitleGetter.getDocumentTitle( |
| 16 document.title, document.documentElement); | 16 document.title, document.documentElement); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 * } | 59 * } |
| 60 * } | 60 * } |
| 61 * } | 61 * } |
| 62 */ | 62 */ |
| 63 | 63 |
| 64 } catch (e) { | 64 } catch (e) { |
| 65 window.console.log("Error during distillation: " + e); | 65 window.console.log("Error during distillation: " + e); |
| 66 } | 66 } |
| 67 return result; | 67 return result; |
| 68 })() | 68 })() |
| OLD | NEW |