BATCH-2679: Add "Back to index" link in the sidebar of the documentation

This commit is contained in:
Mahmoud Ben Hassine
2018-02-06 10:37:35 +01:00
committed by Michael Minella
parent daf0ecfc9f
commit 619a85f2f2

View File

@@ -36,4 +36,14 @@
window.addEventListener('resize', handleTocOnResize);
window.addEventListener('tocRefresh', handleTocRefresh);
handleTocOnResize();
var link = document.createElement("a");
link.setAttribute("href", "index.html");
link.innerHTML = "<i class=\"fa fa-chevron-left\"></i>&nbsp;&nbsp;Back to index";
var p = document.createElement("p");
p.setAttribute("id", "backToIndex");
p.appendChild(link);
var toc = document.getElementById('toc');
toc.insertBefore(p, toctitle);
</script>