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}
|
{2}
|
||||||
|
|
||||||
function callReadability(){
|
function callReadability(){
|
||||||
var loc = document.location;
|
var article = new Readability(document).parse();
|
||||||
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();
|
|
||||||
renderPage(article);
|
renderPage(article);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,8 +66,8 @@ function readablilityBody(article){
|
|||||||
var domain = document.createElement('a');
|
var domain = document.createElement('a');
|
||||||
domain.id = 'reader-domain';
|
domain.id = 'reader-domain';
|
||||||
domain.className = 'domain';
|
domain.className = 'domain';
|
||||||
domain.href = article.uri.spec;
|
domain.href = document.location.href;
|
||||||
domain.innerHTML = article.uri.host;
|
domain.innerHTML = document.location.host;
|
||||||
header.appendChild(domain);
|
header.appendChild(domain);
|
||||||
|
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user