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

Jump to navigation Jump to search
m (oop)
m (oop)
link.innerText = 'diff'
const title = row.querySelector('.mw-changeslist-title')
;(new mw.Api).get({ action: 'query', prop: 'revisions', titles: linktitle.hreftextContent, rvprop: 'ids', }).then(function (resp) {
link.href = title.href
console.log('link changing:', title, title.getAttribute('href'))
;(new mw.Api).get({ action: 'query', prop: 'revisions', titles: link.href, rvprop: 'ids', }).then(function (resp) {
console.log('page', link.href, 'history:', resp)
})