Revert "chore: documents using brotli compression (#3107)" (#3114)

This reverts commit 46069cfe85.
This commit is contained in:
James Yeung 2023-02-19 20:10:20 +08:00 committed by GitHub
parent 46069cfe85
commit 81e60a7c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 24 deletions

View File

@ -266,34 +266,12 @@
// });
</script>
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js" crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script src="https://unpkg.com/@docsearch/js@3.0.0/dist/umd/index.js" crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<script src="_content/AntDesign.Docs/js/docsearch.js"></script>
<script type="module">
import { BrotliDecode } from './decode.min.js';
Blazor.start({
loadBootResource: function (type, name, defaultUri, integrity) {
if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
return (async function () {
const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
if (!response.ok) {
throw new Error(response.statusText);
}
const originalResponseBuffer = await response.arrayBuffer();
const originalResponseArray = new Int8Array(originalResponseBuffer);
const decompressedResponseArray = BrotliDecode(originalResponseArray);
const contentType = type ===
'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
return new Response(decompressedResponseArray,
{ headers: { 'content-type': contentType } });
})();
}
}
});
</script>
<script>
let newWorker;

File diff suppressed because one or more lines are too long