Difference between revisions of "User:Fbstj/gadget/history-test.js"

Jump to navigation Jump to search
m (oop)
m (try this)
$(function () {
 
const API = new mw.Api()
 
// 2019-07-22 make "new" links better
link.innerText = 'diff'
const title = row.querySelector('.mw-changeslist-title')
;(new mw.Api)API.get({ action: 'query', prop: 'revisions', titles: title.textContent, rvprop: 'ids', rvdir: 'newer', }).then(function (resp) {
const pageid = Object.keys(resp.query.pages)[0]
const page = resp.query.pages[pageid]