-
Notifications
You must be signed in to change notification settings - Fork 5
/
docinfo.html
78 lines (73 loc) · 2.68 KB
/
docinfo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<meta property="og:title" content="Cybersecurity: defense in modern organizations">
<meta property="og:type" content="website">
<meta property="og:url" content="https://crcep.github.io/cybersecurity/">
<meta property="og:description" content="Cybersecurity stream page for CRC Corporate Readiness Certificate Educational Program">
<meta property="og:image" content="https://avatars.githubusercontent.com/u/83579804">
<meta property="og:site_name" content="crcep.github.io/cybersecurity">
<meta property="og:locale" content="en_GB" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.1/chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js"></script>
<style>
.listingblock:hover .clipboard {
display: block;
}
.clipboard {
display: none;
border: 0;
font-size: .75em;
text-transform: uppercase;
font-weight: 500;
padding: 6px;
color: #000000;
position: absolute;
top: .425rem;
right: .5rem;
background: #c5c5c5;
}
code + .clipboard {
top: 2rem !important;
}
.clipboard:hover, .clipboard:focus, .clipboard:active {
outline: 0;
background-color: #545454;
}
</style>
<script >
window.onload = function() {
var pre = document.getElementsByTagName('pre');
for (var i = 0; i < pre.length; i++) {
var b = document.createElement('button');
b.className = 'clipboard';
b.textContent = 'Copy';
if (pre[i].childNodes.length === 1 && pre[i].childNodes[0].nodeType === 3) {
var div = document.createElement('div');
div.textContent = pre[i].textContent;
pre[i].textContent = '';
pre[i].appendChild(div);
}
pre[i].appendChild(b);
}
var clipboard = new ClipboardJS('.clipboard', {
target: function(b) {
var p = b.parentNode;
if (p.className.includes("highlight")) {
var elems = p.getElementsByTagName("code");
if (elems.length > 0)
return elems[0];
}
return p.childNodes[0];
}
});
clipboard.on('success', function(e) {
e.clearSelection();
e.trigger.textContent = 'Copied';
setTimeout(function() {
e.trigger.textContent = 'Copy';
}, 2000);
});
clipboard.on('error', function(e) {
console.error('Action:', e.action, e);
console.error('Trigger:', e.trigger);
});
};
</script>