-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.html
75 lines (75 loc) · 4 KB
/
options.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
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>ViHN Options</title>
<head>
<link rel="stylesheet" type="text/css" href="main.css">
<style>
#options { list-style-type: none; }
#options input { width:20px; margin-left:-25px; margin-right:5px; padding:0; }
#options>li { margin-bottom: 2em; }
/*
* NOTE:
* Chrome finally supports hyphens since 2021.
* However, CSS justification can still only do inter-character or inter-word, not both, so it looks terrible.
* hyphenate-limit-chars might help mitigate this but it is not supported by Firefox.
* Without justification, hyphens just add clutter, so no point in enabling them either.
*/
#options { padding-left: 25px; }
#options ul { padding-left: 15px; }
</style>
</head>
<body>
<p>
<strong>Note:</strong>
Changes will be reflected immediately;
no need to reload Hacker News pages.
</p>
<ul id="options">
<li>
<label>
<input type="checkbox" name="smoothScrolling"><strong>Smooth scrolling</strong>
<p>
When navigating moving from an item to another, the viewport is automatically scrolled to make the item visible.
Smooth scrolling can help get a better understanding of where the viewport was scrolled to, but can cause dizziness.
</p>
<ul>
<li>With this option <strong>enabled</strong>, you will briefly see the page move.</li>
<li>With this option <strong>disabled</strong>, the view will jump immediately to the item, with no transition.</li>
</ul>
</label>
</li>
<li>
<label>
<input type="checkbox" name="persistentCollapse"><strong>Persistent collapsed threads</strong>
<p>
When collapsing or uncollapsing comment threads, the effect is performed locally immediately.
However, when logged in, a request is also sent to Hacker News.
This allows Hacker News to persist the state of threads you have collapsed when reloading the page.
</p>
<ul>
<li>With this option <strong>enabled</strong>, the threads you have collapsed will stay collapsed when visiting the page again.</li>
<li>With this option <strong>disabled</strong>, you will still be able to collapse threads when navigating the page, but not be kept when reloading the page.</li>
</ul>
</label>
</li>
<li>
<label>
<input type="checkbox" name="newestItems"><strong>“Newest Items” aside</strong>
<p>
ViHN adds an aside to quickly navigate the comments or stories depending on their age.
However, you might not be using this, or that feature might cause visual clutter, or even performance issues.
If the aside does not look right, or if it causes performance issues, this is a bug;
please <a href="https://github.com/qsantos/ViHN/issues/new/choose">report it</a> with your browser/screen resolution so that we can fix it.
</p>
<ul>
<li>With this option <strong>enabled</strong>, “Newest Items” will be shown towards the left of the screen if there is room, or overlaid when hitting <kbd>n</kbd>.</li>
<li>With this option <strong>disabled</strong>, “Newest Items” will never be shown.</li>
</ul>
</label>
</li>
</ul>
</body>
<script src="get-option.js"></script>
<script src="options.js"></script>
</html>