Skip to content

Commit aac7b3f

Browse files
committed
re-pull officers
1 parent 33546b9 commit aac7b3f

21 files changed

Lines changed: 49 additions & 61 deletions

‎index.html‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@
99

1010
<!-- GitHub Pages SPA redirect handler -->
1111
<script>
12-
// Redirect from 404.html with the path encoded in the query
13-
(function(l) {
14-
if (l.search[1] === '/' ) {
15-
var decoded = l.search.slice(1).split('&').map(function(s) {
16-
return s.replace(/~and~/g, '&')
17-
}).join('?');
18-
window.history.replaceState(null, null,
19-
l.pathname.slice(0, -1) + decoded + l.hash
20-
);
12+
// Check if we were redirected from 404.html
13+
(function() {
14+
var redirect = sessionStorage.redirect;
15+
delete sessionStorage.redirect;
16+
if (redirect && redirect !== location.href) {
17+
history.replaceState(null, null, redirect);
2118
}
22-
}(window.location))
19+
})();
2320
</script>
2421

2522
<meta property="og:title" content="Computational Biology at Berkeley" />

‎public/404.html‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,10 @@
55
<title>Computational Biology at Berkeley</title>
66
<script>
77
// GitHub Pages SPA redirect hack
8-
// This script takes the current URL and converts the path and query
9-
// string into a hash that the client-side router can read
10-
11-
const pathSegmentsToKeep = 0;
12-
const location = window.location;
13-
14-
location.replace(
15-
location.protocol + '//' + location.host + location.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
16-
location.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
17-
(location.search ? '&' + location.search.slice(1).replace(/&/g, '~and~') : '') +
18-
location.hash
19-
);
8+
// Store the current path and redirect to index with the path in sessionStorage
9+
sessionStorage.redirect = location.href;
2010
</script>
11+
<meta http-equiv="refresh" content="0;URL='/'">
2112
</head>
2213
<body>
2314
</body>

‎public/fetched/officers/.notion-hash‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30.2 KB
Loading
-30.3 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)