-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
45 lines (43 loc) · 1.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>HN infinite scroll</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="Description"
content="A simple app that shows a list of the latest 500 stories posted on Hacker News"
/>
<link rel="stylesheet" href="src/styles.scss" />
<link rel="manifest" href="/manifest.webmanifest" />
</head>
<body>
<header>
<h1>Hacker News Story List</h1>
<a href="https://github.com/ivancuric/hn-scroll"
>github.com/ivancuric/hn-scroll</a
>
</header>
<ol id="list"></ol>
<div class="sentinel-container">
<div id="sentinel"></div>
</div>
<script src="src/index.ts"></script>
<script>
if ('serviceWorker' in navigator) {
const x = 'sw.js';
navigator.serviceWorker
.register(x)
.then(function(registration) {
console.log(
'Registration successful, scope is:',
registration.scope,
);
})
.catch(function(error) {
console.log('Service worker registration failed, error:', error);
});
}
</script>
</body>
</html>