1
0
mirror of https://github.com/rclone/rclone.git synced 2025-08-16 00:28:09 +02:00
Files
.github
backend
bin
cmd
cmdtest
contrib
docs
content
i18n
layouts
static
css
fontawesome
img
js
bootstrap.min.4.4.1.js
custom.js
jquery.min.3.5.1.js
popper.min.1.16.0.js
search.js
README.md
config.json
fs
fstest
graphics
lib
librclone
vfs
.gitattributes
.gitignore
.golangci.yml
CONTRIBUTING.md
COPYING
Dockerfile
MAINTAINERS.md
MANUAL.html
MANUAL.md
MANUAL.txt
Makefile
README.md
RELEASE.md
VERSION
go.mod
go.sum
notes.txt
rclone.1
rclone.go
rclone/docs/static/js/custom.js
Nick Craig-Wood ab4a2275eb docs: add copy to clipboard javascript
add popper library for popup menus
2020-05-27 17:31:08 +01:00

22 lines
561 B
JavaScript

// Site JS
$(function() {
// Add hover links on headings
$("h2, h3, h4, h5, h6").each(function(i, el) {
var $el, icon, id;
$el = $(el);
id = $el.attr('id');
icon = '<i class="fa fa-link"></i>';
if (id) {
return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
}
});
// Wire up copy to clipboard buttons
$(".copy-to-clipboard").click(function() {
var copyText = $(this).prev();
copyText.select();
document.execCommand("copy");
$(this).attr("title", "Copied!");
});
});