aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/_includes/footer.html
diff options
context:
space:
mode:
authorGravatar John Cater <jcater@google.com>2016-06-21 13:47:42 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-06-21 14:47:40 +0000
commitcb535dc66fe9eb2817d05a43ecefcfdd9543f578 (patch)
tree9effc713162cd5d94637de05ae4bc30a2470176b /site/_includes/footer.html
parentc15a90c8b21a8d9819c85806057df6bf3d74cdcc (diff)
Adds AnchorJS in site footer to create linkable anchors on every heading.
Fixes #1423 -- MOS_MIGRATED_REVID=125445881
Diffstat (limited to 'site/_includes/footer.html')
-rw-r--r--site/_includes/footer.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/site/_includes/footer.html b/site/_includes/footer.html
index 22382aa9bc..dee27550c5 100644
--- a/site/_includes/footer.html
+++ b/site/_includes/footer.html
@@ -13,6 +13,13 @@
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/assets/js/bootstrap.min.js"></script>
+ <!-- Anchor JS -->
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.0/anchor.min.js"></script>
+ <script>
+ // Automatically add anchors and links to all header elements that don't already have them.
+ anchors.add();
+ </script>
+
<script>
var shiftWindow = function() {
if (location.hash.length !== 0) {