mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-07-25 19:54:14 +02:00
Add permalinks for headings
This commit is contained in:
@@ -19,5 +19,14 @@
|
||||
</head>
|
||||
<body>
|
||||
{{ content }}
|
||||
<script>
|
||||
// add permalink on headings
|
||||
document.querySelectorAll('h2, h3, h4, h5, h5').forEach((heading) => {
|
||||
const link = document.createElement('a');
|
||||
link.className = 'permalink';
|
||||
link.href = `#${heading.id}`;
|
||||
heading.appendChild(link);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user