Diferencia entre revisiones de «MediaWiki:Gadget-show-quality-on-cats.js»
Ir a la navegación
Ir a la búsqueda
m (oops) |
m (try) |
||
console.debug(response)
const all = {}
response.query.pageids.forEach(function (id) {
const page = response.query.pages[id]
if (!page.categories) return
all[page.title] = page.categories
})
document.querySelectorAll('#mw-pages a').forEach(function (el) {
const title = el.getAttribute('title')
const data = all[title]
const icon = String.fromCodePoint.apply(null, icons[cat])
el.parentElement.append(icon)
})
|