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

Jump to navigation Jump to search
m (bail on already patrolled)
m (correct RCid)
// create an api client
const api = new mw.Api()
// fetch the current RC id for the later request
const rcid = mw.util.getParamValue('rcid', this.href)
// the old "button"
const old = document.querySelector('.patrollink')
// fetch the current RC id for the later request
const rcid = mw.util.getParamValue('rcid', thisold.firstElementChild.href)
if (!old) { return }
// setup the new button