download index
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ale 2024-09-23 02:20:45 +02:00
parent e8a85ce0e5
commit 852a55e6fa

View File

@ -112,11 +112,11 @@ document.addEventListener('DOMContentLoaded', function () {
document.getElementById('download_index').addEventListener('click', function (event) {
loading()
ac = new AbortController()
fetch('/api/donwload_index', { signal: ac.signal }).then(async function (result) {
fetch('/api/download_index', { signal: ac.signal }).then(async function (result) {
var res = await result.blob(),
a = document.createElement('a')
a.download = 'fediblock-index.json.gz'
a.href = URL.createObjectURL(res)
a.href = URL.createObjectURL([res])
a.type = 'application/x-gzip'
a.target = '_blank'
a.dispatchEvent(new MouseEvent('click'))