User:逆襲的天邪鬼/del.js

// just in case (for example, failed to import something)

var pages = [];

var reason = confirm('刪除原因'); if (reason) { for (var i=0; i<pages.length; i++) { $.ajax({           url: mw.util.wikiScript('api'),            data: {                format: 'json',                action: 'delete',                title: pages[i],                reason: reason,                token: mw.user.tokens.get('editToken'),            },            dataType: 'json',            type: 'POST',        }); } }