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

m
try that
m (try that)
m (try that)
// the old "button"
const old = document.querySelector('.patrollink')
// progress spinner
const spin = ($.createSpinner({ size: 'small', display: 'inline', }))[0]
// setup the new button
const btn = document.createElement('button')
btn.textContent = 'Patrol'
btn.addEventListener('click', function() {
// clickedprogress spinnner
const spin = ($.createSpinner({ size: 'small', display: 'inline', }))[0]
btn.replaceWith(spin)
api.postWithToken('patrol', {