User:Euphoria/common.js: Difference between revisions
From Test Wiki
Content deleted Content added
fix |
⏳ Tag: Reverted |
||
Line 48:
e.preventDefault();
if (!confirm('Are you sure you want to close as ' + actionObj.name + '?')) return;
// Disable the button and show hourglass while processing
btn.disabled = true;
btn.textContent = '⏳';
const api = new mw.Api();
Line 76 ⟶ 80:
minor: true
}).done(function() {
const link = $(heading).find('a').first();
if (!link.length) {
Line 92 ⟶ 95:
reason: '[[' + mw.config.get('wgPageName') + ']]'
}).done(() => {
const talkPage = 'Talk:' + targetPage;
api.postWithToken('csrf', {
Line 104 ⟶ 106:
}).fail(err => alert('Error deleting page: ' + err));
} else {
// Keep / No consensus
api.get({
action: 'query',
Line 126 ⟶ 128:
minor: true
}).done(() => {
const talkPage = 'Talk:' + targetPage;
api.get({
| |||