Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
let api = new mw.Api();
// https://uk.wikipedia.org/w/api.php?action=query&format=json&list=embeddedin&utf8=1&eititle=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD%3ADeleteslow&eilimit=max
api.get({
action: 'query',
meta: 'tokens'
}).done(function(data) {
console.log(data);
let token = data.query.tokens.csrftoken;
api.get({
action: 'query',
list: 'embeddedin',
eititle: mw.config.get('wgPageName'),
eilimit: 'max'
}).done(function(data) {
$.each(data.query.embeddedin, function() {
let page = this;
api.post({
action: 'edit',
pageid: page.pageid,
summary: 'Zero edit',
appendtext: '',
token: token
}).done(function(data){
console.log(page.title + ' must have been zero-edited');
})
})
});
});