Update Readability.js

closes GH-1

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-06-11 09:16:41 +02:00
parent 31aa81eae2
commit b9306987e6
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07
2 changed files with 785 additions and 776 deletions

View File

@ -21,15 +21,7 @@
{2}
function callReadability(){
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();
renderPage(article);
}
@ -74,8 +66,8 @@ function readablilityBody(article){
var domain = document.createElement('a');
domain.id = 'reader-domain';
domain.className = 'domain';
domain.href = article.uri.spec;
domain.innerHTML = article.uri.host;
domain.href = document.location.href;
domain.innerHTML = document.location.host;
header.appendChild(domain);
var h1 = document.createElement('h1');

File diff suppressed because it is too large Load Diff