40 275
ediciones
m (oops) |
m (oops) |
||
mw.hook('wikipage.content').add(function () {
'Stubs': [0x25D4],
'Partially complete articles': [0x25D2],
'Articles nearing completion': [0x25D5],
'Complete articles': [0x26AB, 0xFE0E],
}
// only on categories
gcmtype: "page",
}).then(function (response) {
▲ const all = {};
response.query.pageids.forEach(function (id) {▼
const page = response.query.pages[id];▼
all[page.title] = page.categories.map(function(o){ return o.title});▼
})▼
console.log(all)▼
const all = {};
})▼
document.querySelectorAll('#mw-pages a').forEach(el) {
Object.keys(icons).forEach(function (cat) {
const title = el.getAttribute('title')
const data = all[title]
if (!data.categories.includes(cat)) { continue }
})
})
})
|