46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||
<%- js("js/vendor.min") %>
|
||
|
||
<% if (theme.graphviz.enable) { %>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.7.1/viz.js"></script>
|
||
<script>
|
||
String.prototype.replaceAll = function(search, replacement) {
|
||
var target = this;
|
||
return target.split(search).join(replacement);
|
||
};
|
||
|
||
let vizObjects = document.querySelectorAll('.graphviz');
|
||
|
||
for (let item of vizObjects) {
|
||
let svg = undefined
|
||
try {
|
||
svg = Viz(item.textContent.replaceAll('–', '--'), 'svg');
|
||
} catch(e) {
|
||
svg = `<pre class="error">${e}</pre>`;
|
||
}
|
||
item.outerHTML = svg;
|
||
}
|
||
</script>
|
||
<% } %>
|
||
|
||
<script>
|
||
/* This POSTs to the clicks-api service to click numbers of downloads of different releases */
|
||
$(document).ready(function () {
|
||
$('a.app-download').click(function (ev) {
|
||
let downloadType = $(this).closest('a').attr('id')
|
||
$.post(`https://clicks.status.im/clicks/${downloadType}`)
|
||
});
|
||
});
|
||
</script>
|
||
|
||
<% if (theme.mermaid.enable) { %>
|
||
<script src='https://unpkg.com/mermaid@<%= theme.mermaid.version %>/dist/mermaid.min.js'></script>
|
||
<script>
|
||
if (window.mermaid) {
|
||
mermaid.initialize({theme: 'forest'});
|
||
}
|
||
</script>
|
||
<% } %> |