mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 18:04:55 +01:00
docs: add copy to clipboard javascript
add popper library for popup menus
This commit is contained in:
parent
c8683fc916
commit
ab4a2275eb
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<script src="/js/jquery.js"></script>
|
<script src="/js/jquery.js"></script>
|
||||||
|
<script src="/js/popper.min.js"></script>
|
||||||
<script src="/js/bootstrap.js"></script>
|
<script src="/js/bootstrap.js"></script>
|
||||||
<script src="/js/custom.js"></script>
|
<script src="/js/custom.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
11
docs/static/js/custom.js
vendored
11
docs/static/js/custom.js
vendored
@ -1,8 +1,8 @@
|
|||||||
// Site JS
|
// Site JS
|
||||||
|
|
||||||
// Add hover links on headings
|
|
||||||
$(function() {
|
$(function() {
|
||||||
return $("h2, h3, h4, h5, h6").each(function(i, el) {
|
// Add hover links on headings
|
||||||
|
$("h2, h3, h4, h5, h6").each(function(i, el) {
|
||||||
var $el, icon, id;
|
var $el, icon, id;
|
||||||
$el = $(el);
|
$el = $(el);
|
||||||
id = $el.attr('id');
|
id = $el.attr('id');
|
||||||
@ -11,4 +11,11 @@ $(function() {
|
|||||||
return $el.prepend($("<a />").addClass("header-link").attr("href", "#" + id).html(icon));
|
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!");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
5
docs/static/js/popper.min.js
vendored
Normal file
5
docs/static/js/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user