Sha256: a41cd59ee8f91ef5f200f26f65e7258f991dd3a21bae21c3ae0755b6ebf3d91f
Contents?: true
Size: 1.16 KB
Versions: 19
Compression:
Stored size: 1.16 KB
Contents
<!-- Author: Ray-Eldath --> <style> .markdown-body .anchor{ float: left; margin-top: -8px; margin-left: -20px; padding-right: 4px; line-height: 1; opacity: 0; } .markdown-body .anchor .anchor-icon{ font-size: 15px } </style> <script> $(document).ready(function() { let nodes = document.querySelector(".markdown-body").querySelectorAll("h1,h2,h3") for(let node of nodes) { var anchor = document.createElement("a") var anchorIcon = document.createElement("i") anchorIcon.setAttribute("class", "fa fa-anchor fa-lg anchor-icon") anchorIcon.setAttribute("aria-hidden", true) anchor.setAttribute("class", "anchor") anchor.setAttribute("href", "#" + node.getAttribute("id")) anchor.onmouseover = function() { this.style.opacity = "0.4" } anchor.onmouseout = function() { this.style.opacity = "0" } anchor.appendChild(anchorIcon) node.appendChild(anchor) } }) </script>
Version data entries
19 entries across 19 versions & 1 rubygems