-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
82 lines (82 loc) · 2.89 KB
/
popup.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: monospace;
}
button {
font-family: monospace;
font-size: 1.9em;
display: block;
margin: auto;
width: 12em;
height: 3em;
background: white;
border: 2px solid gray;
border-radius: 5px;
}
input {
width: 12em;
margin-bottom: 3em;
}
.slider {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 2px;
background: gray;
outline: none; /* Remove outline */
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 10px;
height: 10px;
border-radius: 100%;
background: black;
cursor: pointer;
}
svg {
fill: gray;
width: 4em;
height: 4em;
margin: auto;
display: block;
}
p {
font-size: 1.3em;
text-align: center;
font-family: monospace;
display: inline-block;
width: 12em;
margin: auto;
}
#done, #settings-full {
display: none;
}
</style>
</head>
<body>
<button id="activate"><b>get lazy</b></button>
<br/>
<svg id="settings" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path fill="none" d="M0 0h20v20H0V0z"/>
<path d="M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"/>
</svg>
<div id="settings-full">
<p>scroll up threshold (low means you tilt a lot to scroll up)</p>
<input type="range" min="-0.05" max="0.10" step="0.01" class="slider" id="up-threshold">
<p>scroll down threshold (high means you tilt a lot to scroll down)</p>
<input type="range" min="0.10" max="0.25" step="0.01" class="slider" id="down-threshold">
<p>scroll speed</p>
<input type="range" min="5" max="30" class="slider" step="1" id="speed">
<p>restart extension for settings to go into effect</p>
<svg id="done" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0z"/>
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
</svg>
</div>
<script src="popup.js"></script>
</body>
</html>