Chromium Code Reviews| Index: components/dom_distiller/core/javascript/domdistiller.js |
| diff --git a/components/dom_distiller/core/javascript/domdistiller.js b/components/dom_distiller/core/javascript/domdistiller.js |
| index eb5d4c5926a2942012de6ca150f3716c62d8e0db..a10c2e08a9ce01372837aefc6879d42ffe0aca09 100644 |
| --- a/components/dom_distiller/core/javascript/domdistiller.js |
| +++ b/components/dom_distiller/core/javascript/domdistiller.js |
| @@ -2,8 +2,6 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// TODO(cjhopman): remove dependency on readability. |
| - |
| // These includes will be processed at build time by grit. |
| <include src="../../../../third_party/dom_distiller_js/js/domdistiller.js"/> |
| @@ -13,12 +11,16 @@ |
| // element is the previous page link. |
| (function() { |
| var result = new Array(4); |
| - result[0] = com.dom_distiller.DocumentTitleGetter.getDocumentTitle( |
| - document.title, document.documentElement); |
| - result[1] = com.dom_distiller.ContentExtractor.extractContent(); |
| - result[2] = com.dom_distiller.PagingLinksFinder.findNext( |
| - document.documentElement); |
| - // TODO(shashishekhar): Add actual previous page link here. |
| - result[3] = ''; |
| + try { |
| + result[0] = com.dom_distiller.DocumentTitleGetter.getDocumentTitle( |
| + document.title, document.documentElement); |
| + result[1] = com.dom_distiller.ContentExtractor.extractContent(); |
| + result[2] = com.dom_distiller.PagingLinksFinder.findNext( |
| + document.documentElement); |
| + // TODO(shashishekhar): Add actual previous page link here. |
| + result[3] = ''; |
| + } catch (e) { |
| + window.console.log("Erring during distillation: " + e); |
|
cjhopman
2014/03/27 00:22:39
s/Erring/Error ?
Yaron
2014/04/02 17:11:59
Done.
|
| + } |
| return result; |
| })() |