-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.html
26 lines (24 loc) · 970 Bytes
/
header.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index of</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/fancyindex_theme/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="/fancyindex_theme/assets/css/style.css">
<script>
window.onload = function() {
var currentIndex = document.getElementsByTagName("h1")[0].textContent;
var links = document.getElementsByTagName("tbody")[0].getElementsByTagName("a");
var parentDirectory = links[0];
// set the page title
document.title = 'Index of ' + currentIndex;
// change the parent directory icon
if (parentDirectory.text == 'Parent directory/') {
parentDirectory.classList.add("parent");
}
}
</script>
</head>
<body>
<h1>