40 275
ediciones
m (tweak) |
m (guard against bad response) |
||
response.query.pageids.forEach(function (id) {
const page = response.query.pages[id];
if (!page.categories) return
all[page.title] = page.categories.map(function(o){ return o.title.replace('Category:','') });
})
const title = el.getAttribute('title')
const data = all[title]
if (!data.categories.includes(cat))
console.log(title, 'is a', cat)
})
|