Skip to content

Commit ddd0d55

Browse files
committed
Give endnotes a heading
See #260
1 parent 77b5cdd commit ddd0d55

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/assets/js/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Load objects as variables.
1010

1111
var code = document.querySelectorAll('pre code'),
12+
endnote = document.querySelector('.footnotes'),
1213
navmenu = document.getElementById('site-navigation');
1314

1415
// Syntax highlighting, via 'Prism'.
@@ -26,6 +27,12 @@
2627
Prism.highlightAll();
2728
}
2829

30+
// Inject a heading into endnotes regions.
31+
32+
if (endnote) {
33+
endnote.insertAdjacentHTML('afterbegin', '<h4>Endnotes</h4>');
34+
}
35+
2936
// Responsive navigation menu.
3037

3138
if (navmenu) {

0 commit comments

Comments
 (0)