Skip to content

Commit 8ad33bb

Browse files
committed
Add copy clipboard button
1 parent e392c60 commit 8ad33bb

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434
<!-- Favicon -->
3535
<link rel="icon" type="image/png" href="/static/favicon-32x32.png" sizes="32x32" />
3636
<link rel="icon" type="image/png" href="/static/favicon-16x16.png" sizes="16x16" />
37+
<link rel="shortcut icon" href="/static/favicon.ico">
3738

3839
<!-- Stylesheet -->
3940
<link href="https://fonts.googleapis.com/css?family=Bitter|Source+Sans+Pro" rel="stylesheet">
4041
<link rel="stylesheet" href="/static/style.min.css">
42+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codecopy/umd/codecopy.min.css">
4143

4244
</head>
4345

@@ -50,4 +52,5 @@
5052
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
5153
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
5254
<script src="//unpkg.com/prismjs/components/prism-jsx.min.js"></script>
55+
<script src="//cdn.jsdelivr.net/npm/codecopy/umd/codecopy.min.js"></script>
5356
</html>

src/css/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ main {
514514

515515
body.sticky .sidebar,
516516
body.sticky .sidebar-toggle {
517+
cursor: pointer;
517518
position: fixed;
518519
}
519520

src/js/main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
/* global codecopy */
2+
13
window.$docsify = {
24
name: 'metascraper',
35
repo: 'microlinkhq/metascraper',
46
maxLevel: 3,
57
executeScript: true,
68
auto2top: true,
79
ga: 'UA-108549225-3',
8-
noEmoji: true
10+
noEmoji: true,
11+
plugins: [
12+
function (hook, vm) {
13+
hook.ready(function () {
14+
codecopy('pre')
15+
})
16+
}
17+
]
918
}

static/main.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)