diff --git a/public/index.html b/public/index.html
index 92aac24..4c9278e 100644
--- a/public/index.html
+++ b/public/index.html
@@ -54,9 +54,10 @@
Total scanned 0 instances with 0 peers - 0 created - 0
updated
- matrix off - download json index -
+ matrix off - download json index -
by ale
- ©2024
+ ©2024
diff --git a/public/main.js b/public/main.js
index beb8bba..06ba8bc 100644
--- a/public/main.js
+++ b/public/main.js
@@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', function () {
document.getElementById('instance').addEventListener('keyup', function (event) {
if (event.key && !event.ctrlKey && !event.altKey && !event.shiftKey) {
if ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== '')) {
- keypress(event, event.target.value)
+ keypress(event.target.value)
} else {
event.preventDefault()
event.stopPropagation()
@@ -112,26 +112,23 @@ document.addEventListener('DOMContentLoaded', function () {
document.getElementById('download').addEventListener('click', function (event) {
loading()
ac = new AbortController()
- try {
- fetch('/api/donwload_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.type = 'application/x-gzip'
- a.target = '_blank'
- a.dispatchEvent(new MouseEvent('click'))
- document.getElementById('loader-content').style.display = 'none'
- }).catch(function (err) {
- console.error(err)
- document.getElementById('loader-content').style.display = 'none'
- })
- } catch (e) {
- console.error(e)
+ fetch('/api/donwload_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.type = 'application/x-gzip'
+ a.target = '_blank'
+ a.dispatchEvent(new MouseEvent('click'))
document.getElementById('loader-content').style.display = 'none'
- }
+ }).catch(function (err) {
+ console.error(err)
+ document.getElementById('loader-content').style.display = 'none'
+ })
+ event.preventDefault()
+ event.stopPropagation()
})
- function keypress(event, content) {
+ function keypress(content) {
loading()
if (timeout) {
clearTimeout(timeout)