| 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 ce0ebd821f5abee76ae77855f1684484e4d29b7e..62f860b5003aae5d4d549c261fcb70bd5cb0780d 100644
|
| --- a/components/dom_distiller/core/javascript/domdistiller.js
|
| +++ b/components/dom_distiller/core/javascript/domdistiller.js
|
| @@ -19,6 +19,48 @@
|
| document.documentElement);
|
| // TODO(shashishekhar): Add actual previous page link here.
|
| result[3] = '';
|
| +
|
| + /**
|
| + * // Properties from markup tags.
|
| + *
|
| + * var parser = new com.dom_distiller.MarkupParser(document.documentElement);
|
| + * if (!parser.optOut()) {
|
| + * // Basic properties.
|
| + * var title = parser.getTitle(); // String type.
|
| + * var pageType = parser.getType(); // String type.
|
| + * var pageUrl = parser.getUrl(); // String type.
|
| + * var author = parser.getAuthor(); // String type.
|
| + * var description = parser.getDescription(); // String type.
|
| + * var publisher = parser.getPublisher(); // String type.
|
| + * var copyright = parser.getCopyright(); // String type.
|
| + *
|
| + * // Structured Image's.
|
| + * var images = parser.getImages();
|
| + * for (var i = 0; i < images.length; i++) {
|
| + * var image = images[i];
|
| + * var url = image.getUrl(); // String type.
|
| + * var secureUrl = image.getSecureUrl(); // String type.
|
| + * var type = image.getType(); // String type.
|
| + * var caption = image.getCaption(); // String type.
|
| + * var width = image.getWidth(); // int type.
|
| + * var height = image.getHeight(); // int type.
|
| + * }
|
| + *
|
| + * // Structured Article.
|
| + * var article = parser.getArticle();
|
| + * if (article != null) {
|
| + * var publishedTime = article.getPublishedTime(); // String type.
|
| + * var modifiedTime = article.getModifiedTime(); // String type.
|
| + * var expirationTime = article.getExpirationTime(); // String type.
|
| + * var sectionName = article.getSection(); // String type.
|
| + * var authors = article.getAuthors();
|
| + * for (var i = 0; i < authors.length; i++) {
|
| + * var author = authors[i]; // String type.
|
| + * }
|
| + * }
|
| + * }
|
| + */
|
| +
|
| } catch (e) {
|
| window.console.log("Error during distillation: " + e);
|
| }
|
|
|