-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
74 lines (72 loc) · 3.53 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="apple-touch-icon" sizes="144x144" href="images/icons/apple-touch-icon.png">
<link rel="icon" type="images/png" sizes="32x32" href="images/icons/favicon-32x32.png">
<link rel="icon" type="images/png" sizes="16x16" href="images/icons/favicon-16x16.png">
<link rel="manifest" href="images/icons/site.webmanifest">
<link rel="mask-icon" href="images/icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="images/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="images/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/powershell.min.js"></script>
<script src="js/highlightjs-badge.js"></script>
<script src="js/highlight.ln.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<style>
.code-badge {
top: initial !important;
}
</style>
</head>
<body>
<div class="container">
<pre class="syntax">
<code class="language-powershell badgeCopy">PS> Set-SF-PnPDefaultFeatures -URL "https://statefund.sharepoint.com/sites/testcomm"</code>
</pre>
<pre>
<code class="language-powershell badgeCopy">
PS> Set-SF-PnPDefaultFeatures -URL "https://statefund.sharepoint.com/sites/testcomm"
$var = 'Test'
Set-Something -Arg1 $var
</code>
</pre>
</div>
<script>
setTimeout(function () {
//var pres = document.querySelectorAll("pre>code");
var pres = document.querySelectorAll("pre>.badgeCopy");
for (var i = 0; i < pres.length; i++) {
hljs.highlightElement(pres[i]);
}
var options = {
contentSelector: ".container",
//contentSelector: "pre",
// Delay in ms used for `setTimeout` before badging is applied
// Use if you need to time highlighting and badge application
// since the badges need to be applied afterwards.
// 0 - direct execution (ie. you handle timing
loadDelay:0,
// CSS class(es) used to render the copy icon.
copyIconClass: "fa fa-copy",
// CSS class(es) used to render the done icon.
checkIconClass: "fa fa-check text-success",
// intercept text copying - passed in text return text out
onBeforeCodeCopied: function(text) {
//text = "$$$ " + text;
return text;
}
};
window.highlightJsBadge(options);
},10);
</script>
</body>
</html>