4
4
< meta charset ="UTF-8 " />
5
5
< link rel ="icon " type ="image/png " href ="/icon.png " />
6
6
< link rel ="stylesheet " href ="/index.css " />
7
- < link rel ="stylesheet " href ="/hljs/default.min.css " />
7
+ < link
8
+ rel ="stylesheet "
9
+ href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css "
10
+ />
8
11
< meta name ="viewport " content ="width=device-width " />
9
12
< meta
10
13
property ="og:title "
@@ -43,7 +46,7 @@ <h1>MCping API</h1>
43
46
Bedrock API response is the same, with the caveat of never returning the
44
47
icon. The bedrock player list may also be synthetic.
45
48
</ p >
46
- < pre > < code id ="examplePingResponse " class ="language-json " style =" text-align: left; display: inline-block; " > </ code > </ pre >
49
+ < pre > < code id ="examplePingResponse " class ="language-json "> </ code > </ pre >
47
50
< br />
48
51
< p >
49
52
There is also a Mojang Services API, at
@@ -53,30 +56,8 @@ <h1>MCping API</h1>
53
56
< code > DefiniteProblems</ code > , < code > PossibleProblems</ code > , and
54
57
< code > Operational</ code > .
55
58
</ p >
56
- < pre > < code id ="exampleServicesResponse " class ="language-json "
57
- style ="text-align: left; display: inline-block; "> </ code > </ pre >
59
+ < pre > < code id ="exampleServicesResponse " class ="language-json "> </ code > </ pre >
60
+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js "> </ script >
61
+ < script src ="/api.js "> </ script >
58
62
</ body >
59
- < script src ="/hljs/highlight.min.js "> </ script >
60
- < script >
61
- async function loadExampleResponses ( ) {
62
- let ping = await fetch ( "/api/java/mcping.me" , { } ) . then ( ( response ) =>
63
- response . json ( ) ,
64
- ) ;
65
- let ping_response = JSON . stringify ( ping , null , " " ) ;
66
- document . getElementById ( "examplePingResponse" ) . innerHTML = new Option (
67
- ping_response ,
68
- ) . innerHTML ;
69
- let services = await fetch ( "/api/services" , { } ) . then ( ( response ) =>
70
- response . json ( ) ,
71
- ) ;
72
- const services_string = JSON . stringify ( services , null , " " ) ;
73
- document . getElementById ( "exampleServicesResponse" ) . innerHTML = new Option (
74
- services_string ,
75
- ) . innerHTML ;
76
- }
77
-
78
- loadExampleResponses ( ) . then ( ( ) => {
79
- hljs . highlightAll ( ) ;
80
- } ) ;
81
- </ script >
82
63
</ html >
0 commit comments