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