diff --git a/public/main.js b/public/main.js
index 6a1537b..ed462e3 100644
--- a/public/main.js
+++ b/public/main.js
@@ -44,7 +44,7 @@ document.addEventListener('DOMContentLoaded', function () {
while (list.hasChildNodes()) {
list.removeChild(list.firstChild)
}
- res.instances.map((instance, index) => {
+ res.instances.map(function (instance, index) {
var li = document.createElement('li'),
text = document.createTextNode((index + 1) + '. '),
link = '' + instance.instance + '',
@@ -121,7 +121,7 @@ document.addEventListener('DOMContentLoaded', function () {
hold = true
listinstance(content, ac)
} else if (content.length > 0 && hold) {
- timeout = setTimeout(() => {
+ timeout = setTimeout(function () {
listinstance(content, ac)
}, 300)
}
@@ -135,7 +135,7 @@ document.addEventListener('DOMContentLoaded', function () {
while (list.hasChildNodes()) {
list.removeChild(list.firstChild)
}
- res.instances.map(r => {
+ res.instances.map(function (r) {
var li = document.createElement('li')
li.innerHTML = r.domain + (r.blocks ? ' - ' + r.blocks + ' blocks' : '')
+ (r.nodeinfo ? ' ⓘ' : '')
@@ -162,7 +162,7 @@ document.addEventListener('DOMContentLoaded', function () {
var res = await result.json()
if (res.blocks && Array.isArray(res.blocks) && res.blocks.length > 0) {
var csv = '#domain,#severity,#reject_media,#reject_reports,#public_comment,#obfuscate\n'
- res.blocks.map((r, i) => {
+ res.blocks.map(function (r, i) {
var liblock = document.createElement('li'),
text = document.createTextNode((i + 1) + '. '),
link = '' + r.domain + '',
@@ -215,7 +215,9 @@ document.addEventListener('DOMContentLoaded', function () {
})
var placeholder = document.getElementById('placeholder')
if (res.suggests.length > 0) {
- placeholder.innerHTML = res.suggests.map(instance => '' + instance + '').join(', ')
+ placeholder.innerHTML = res.suggests.map(function (instance) {
+ return '' + instance + ''
+ }).join(', ')
} else {
placeholder.innerText = ''
}
@@ -238,7 +240,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
document.getElementById('loader-content').style.display = 'none'
hold = false
- }).catch(err => {
+ }).catch(function (err) {
// console.error(err)
document.getElementById('loader-content').style.display = 'none'
hold = false
@@ -260,7 +262,7 @@ document.addEventListener('DOMContentLoaded', function () {
strong.appendChild(text)
li.appendChild(strong)
list.appendChild(li)
- res.map((r, i) => {
+ res.map(function (r, i) {
var li = document.createElement('li'),
text = document.createTextNode(`${i + 1} - ${r.domain} - ${r.count} blocks`)
li.addEventListener('click', function (event) {
@@ -284,7 +286,7 @@ document.addEventListener('DOMContentLoaded', function () {
placeholder.innerText = ''
hold = false
document.getElementById('loader-content').style.display = 'none'
- }).catch(err => {
+ }).catch(function (err) {
console.error(err)
hold = false
document.getElementById('loader-content').style.display = 'none'
@@ -336,7 +338,7 @@ document.addEventListener('DOMContentLoaded', function () {
var bounce = document.getElementById('bounce'),
host = new URL(window.location.href).host
reg = '(<\/?p>|(https?:\/\/)?' + host + ')'
- bounce.innerHTML = res.map(p => `${p.content.replace(new RegExp(reg, 'igm'), '')} ${dayjs().to(p.published)}`).join(' | ')
+ bounce.innerHTML = res.map(function (p) { return `${p.content.replace(new RegExp(reg, 'igm'), '')} ${dayjs().to(p.published)}` }).join(' | ')
}
})
fetch('/api/served').then(async function (result) {