blob: 68bda81145cf7dd59a285b3efa163db5c132f818 (
plain)
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
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var td = document.querySelector('table#header td.main');
if (!td) return;
var homeLink = td.querySelector('a[href="/"]');
if (!homeLink) return;
homeLink.textContent = '/repos';
td.childNodes.forEach(function(node) {
if (node.nodeType === 3) {
node.textContent = node.textContent.replace(' : ', '/');
}
});
// Rewrite relative img src in README/about pages to cgit plain/ endpoint
if (/\/about\//.test(window.location.pathname)) {
var m = window.location.pathname.match(/^\/([^/]+)\/about\//);
if (m) {
var repo = m[1];
var branch = (new URLSearchParams(window.location.search)).get('h') || 'main';
document.querySelectorAll('div#summary img').forEach(function(img) {
var src = img.getAttribute('src');
if (src && !/^https?:\/\//.test(src) && !/^\//.test(src)) {
img.src = '/' + repo + '/plain/' + src + '?h=' + branch;
}
});
}
}
});
</script>
|