diff --git a/README.md b/README.md index 99a9163..e0f0413 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,14 @@ Please make sure to run [eslint](http://eslint.org/) against any proposed change ## Usage -To parse a document, you must create a new `Readability` object from a URI object and a document object, and then call `parse()`. Here's an example: +To parse a document, you must create a new `Readability` object from a document object, and then call `parse()`. Here's an example: ```javascript -var loc = document.location; -var uri = { - spec: loc.href, - host: loc.host, - prePath: loc.protocol + "//" + loc.host, - scheme: loc.protocol.substr(0, loc.protocol.indexOf(":")), - pathBase: loc.protocol + "//" + loc.host + loc.pathname.substr(0, loc.pathname.lastIndexOf("/") + 1) -}; -var article = new Readability(uri, document).parse(); +var article = new Readability(document).parse(); ``` This `article` object will contain the following properties: -* `uri`: original `uri` object that was passed to constructor * `title`: article title * `content`: HTML string of processed article content * `length`: length of article, in characters @@ -42,15 +33,6 @@ This `article` object will contain the following properties: If you're using Readability on the web, you will likely be able to use a `document` reference from elsewhere (e.g. fetched via XMLHttpRequest, in a same-origin `