-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
28 lines (28 loc) · 954 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>redoc try demo</title>
</head>
<body>
<div id="redoc-container"></div>
<script>
function getQueryString(name) {
const reg = new RegExp(`(^|&)` + name + `=([^&]*)(&|$)`)
const r =
window.location.search.substr(1).match(reg) ||
window.location.hash
.substring(window.location.hash.search(/\?/) + 1)
.match(reg)
return r != null ? decodeURIComponent(r[2]) : ``
}
window.initTryOptions = {
openApi: getQueryString(`openApi`),
}
!window.initTryOptions.openApi && (delete window.initTryOptions.openApi);
</script>
<script src="https://cdn.jsdelivr.net/npm/redoc@2.1.5/bundles/redoc.standalone.min.js"> </script>
<script type="module" src="/src/main.js"></script>
</body>
</html>