Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: components/dom_distiller/core/javascript/readability.js

Issue 176083002: Use boilerpipe-based dom-distiller-js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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/readability/js/readability.js"/>
6
7 // Extracts long-form content from a page and returns and array where the first
8 // element is the article title, the second element is HTML containing the
9 // long-form content, and remaining elements are URLs for images referenced by
10 // that HTML. Each <img> tag in the HTML has an id field set to k - 2, which
11 // corresponds to a URL listed at index k in the array returned.
12 (function () {
13 readability.init();
14 var result = new Array(4);
15 result[0] = readability.getArticleTitle();
16 result[1] = readability.getDistilledArticleHTML();
17 result[2] = readability.getNextPageLink();
18 // TODO(shashishekhar): Add actual previous page link here.
19 result[3] = '';
20 return result.concat(readability.getImages());
21 }())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698