github.com/artpar/rclone@v1.67.3/docs/static/js/custom.js (about)

     1  // Site JS
     2  
     3  $(function() {
     4    // Add hover links on headings
     5    $("h2, h3, h4, h5, h6").each(function(i, el) {
     6      var $el, icon, id;
     7      $el = $(el);
     8      id = $el.attr('id');
     9      icon = '<i class="fa fa-link"></i>';
    10      if (id) {
    11        return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
    12      }
    13    });
    14    // Wire up copy to clipboard buttons
    15    $(".copy-to-clipboard").click(function() {
    16      var copyText = $(this).prev();
    17      copyText.select();
    18      document.execCommand("copy");
    19      $(this).attr("title", "Copied!");
    20    });
    21  });