-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
85 lines (81 loc) · 2.89 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<html>
<head>
<title>Readability bookmarklet</title>
<link href='https://readability.viktor.tech/clean.css' rel='stylesheet'/>
</head>
<body>
<div class="page">
<h2>simple readabilty bookmarklet</h2>
<p>just drag link below to your bookmark bar in chrome and press it on any page</p>
<p><a href="javascript: (
browser.bookmarks.create({
title: "reader mode",
url: "javascript: (
function () {
console.log('start');
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://cdn.rawgit.com/mozilla/readability/8525c6af/Readability.js');
window.cleanHtml = (function() {
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();
document.children[0].innerHTML = article.content;
var cleanStyle= document.createElement('link');
cleanStyle.setAttribute('href','https://readability.viktor.tech/clean.css');
cleanStyle.setAttribute('rel','stylesheet');
document.head.appendChild(cleanStyle);
});
jsCode.onload = cleanHtml;
document.body.appendChild(jsCode);
}()
)"
})
)">install!</a></p>
<a id href="javascript: (
function () {
console.log('start');
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://cdn.rawgit.com/mozilla/readability/8525c6af/Readability.js');
window.cleanHtml = (function() {
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();
document.children[0].innerHTML = article.content;
var cleanStyle= document.createElement('link');
cleanStyle.setAttribute('href','https://readability.viktor.tech/clean.css');
cleanStyle.setAttribute('rel','stylesheet');
document.head.appendChild(cleanStyle);
});
jsCode.onload = cleanHtml;
document.body.appendChild(jsCode);
}()
);" >readable!</a>
<p>
Source code: <a href="https://github.com/viktor-evdokimov/bookmarklet-readability">bookmarklet-readability</a>
</p>
<p>
<a href="https://readability.viktor.tech">Bookmark this page</a>
</p>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-115208595-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-115208595-1');
</script>
</body>
</html>