40,275
edits
m (smaller links) |
m (Fbstj moved page User:Fbstj/common.js to User:Fbstj/gadget/history-test.js without leaving a redirect) |
||
(152 intermediate revisions by the same user not shown) | |||
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) {
const page = resp.query.pages[pageid]
page.revisions.forEach(console.log)
})
})
|