-
Notifications
You must be signed in to change notification settings - Fork 0
/
md.html
28 lines (28 loc) · 1.38 KB
/
md.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
<html>
<style>body {color:#FF7D0A; font-family:monospace; font-size:larger;} a {color:#FF7D0A;} li {overflow-wrap:break-word;} hr {color:#FF7D0A;}</style>
<body>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<div id='content'></div>
<script>
var param = new URLSearchParams(window.location.search);
var filename = 'https://raw.githubusercontent.com/gastank/gastank.github.io/master/' + param.get('file');
fetch(filename)
.then(response => response.text())
.then(text => {
let text2 = text;
if (param.get('file') == 'balance.txt') {
const old_ = new RegExp('\nactions', 'g');
const new_ = '\n- actions';
const old2_ = new RegExp('\n####', 'g');
const new2_ = '\n\n####';
const old3_ = new RegExp('\\*', 'g');
const new3_ = '\\*';
const old4_ = new RegExp('\n\n###', 'g');
const new4_ = '\n___\n###';
text2 = text.replace(old4_, new4_).replace(old_, new_).replace(old2_, new2_).replace(old3_, new3_);
}
document.getElementById('content').innerHTML = marked(text2);
});
</script>
</body>
</html>