Update Readability.js
closes GH-1 Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
parent
31aa81eae2
commit
b9306987e6
@ -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
Loading…
Reference in New Issue
Block a user