OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 <include src="../../../../third_party/dom_distiller_js/js/domdistiller.js"/> | |
nyquist
2014/02/26 00:30:15
To be honest, I didn't know RenderViewHost::Execut
nyquist
2014/02/26 00:53:16
In fact, since this is GRIT, could we maybe add a
cjhopman
2014/02/27 02:43:09
Done.
| |
6 <include src="../../../../third_party/readability/js/readability.js"/> | |
7 | |
8 // Extracts long-form content from a page and returns and array where the first | |
9 // element is the article title, the second element is HTML containing the | |
10 // long-form content, and remaining elements are URLs for images referenced by | |
11 // that HTML. Each <img> tag in the HTML has an id field set to k - 2, which | |
12 // corresponds to a URL listed at index k in the array returned. | |
13 (function() { | |
14 readability.init(); | |
Yaron
2014/02/26 02:50:50
Add TODO: remove dependency on readability.
cjhopman
2014/02/27 02:43:09
Done.
| |
15 var result = new Array(4); | |
16 result[0] = readability.getArticleTitle(); | |
17 result[1] = com.dom_distiller.ContentExtractor.extractContent() | |
18 result[2] = readability.getNextPageLink(); | |
19 // TODO(shashishekhar): Add actual previous page link here. | |
20 result[3] = ''; | |
21 return result.concat(readability.getImages()); | |
22 })() | |
OLD | NEW |