Difference between revisions of "User:Fbstj/gadget/history-test.js"
Jump to navigation
Jump to search
m (try that) |
m (try that) |
||
// the old "button"
const old = document.querySelector('.patrollink')
// progress spinner
const spin = $.createSpinner({ size: 'small', display: 'inline', })
// setup the new button
const btn = document.createElement('button')
mw.notify('clicked')
btn.setAttribute('disabled', true)
btn.replaceWith(spin)
setTimeout(function() { btn.removeAttribute('disabled'); spin.replaceWith(button) }, 5000);
})
// hide old button and show new one
|