40,275
edits
m (move artist filling to gadget) |
m (try this) |
||
});
mw.hook('wikipage.content').add(function revs_gadget() {
const pageid = mw.config.get('wgArticleId')
const query = {
// request the history of this page
pageids: [pageid],
prop: 'revisions',
// request the oldest edits first
rvdir: 'newer',
// request as many as you can at once
rvlimit: 'max',
// properties to fetch:
rvprop: [ 'ids', 'user', 'timestamp', 'size', 'tags', ],
}
const api = new mw.Api({ parameters: query, })
api.get().then(function old_hist(resp) {
cosnt page = resp.query.pages[pageid]
page.revisions.forEach(console.log)
})
})
|