Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 9c2b53d

Browse files
committed
updates for navigation
1 parent 57adeff commit 9c2b53d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,16 @@ <h2 id="site-description" class="brand-tagline">Direct to you!</h2>
6666
</li>
6767
</ul>
6868
</nav>
69+
<div id="add-app" style="display:none;margin:10px">
70+
<a class="pure-button" href="#" onClick="showAddAppPrompt()">Activate App Mode</a>
71+
</div>
6972
</div>
7073
</div>
7174

7275
<div class="content pure-u-1 pure-u-md-3-4">
7376
<div>
7477

75-
<div class="posts">
78+
<div class="posts" id="latest-news">
7679
<h1 class="content-subhead">Latest News</h1>
7780
<div id="output"></div>
7881
</div>

js/anynews.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ window.addEventListener('beforeinstallprompt', (e) => {
1010
e.preventDefault();
1111
// Stash the event so it can be triggered later.
1212
deferredPrompt = e;
13+
14+
$("#add-app").show();
15+
1316
});
1417

1518
function showAddAppPrompt () {
@@ -27,7 +30,6 @@ function showAddAppPrompt () {
2730
deferredPrompt = null;
2831
});
2932

30-
3133
}
3234

3335
function loadFeed (rssurl,templateId) {
@@ -80,6 +82,7 @@ $.get(rssurl, function(data) {
8082

8183
var html = tmpl.render(item);
8284
$('#output').append(html);
85+
$(window).scrollTop($('#latest-news').offset().top);
8386
});
8487
});
8588

service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Names of the two caches used in this version of the service worker.
1515
// Change to v2, etc. when you update any of the local resources, which will
1616
// in turn trigger the install event again.
17-
const PRECACHE = 'precache-v3';
17+
const PRECACHE = 'precache-v7';
1818
const RUNTIME = 'runtime';
1919

2020
// A list of local resources we always want to be cached.

0 commit comments

Comments
 (0)