<head>
<script>
window.onload = function() {
    var url = new URL(window.location);
    url.pathname += "api-docs.json";
    var newLoc = "http://matrix.org/docs/api/client-server/?url=" + encodeURIComponent(url);
    document.getElementById("apidocs").href = newLoc;
};
</script>
</head>
<body><ul>
<li><a id="apidocs">api docs</a></li>
<li><a href="index.html">spec</a></li>
</ul>
</body>

<head>
<script>
window.onload = function() {
    var url = new URL(window.location);
    url.pathname += "api-docs.json";
    var newLoc = "http://petstore.swagger.io/?url=" + encodeURIComponent(url);
    document.getElementById("apidocs").href = newLoc;
};
</script>
</head>
<body><ul>
<li><a id="apidocs">api docs</a></li>
<li><a href="index.html">spec</a></li>
</ul>
</body>

Use petstore for continuserv swagger docs
Use petstore for continuserv swagger docs

Matrix.org's swagger browser is behind https, which means it can't read the
swagger from a continuserv on http. Use the petstore instead.
