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)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
function getMoveToken(title, cb) { $.get('/wiki/api.php?format=json&action=query&prop=info&intoken=move&titles='+title, function (data) { var d = JSON.parse(data); console.log(d); d = d.query.pages; for (var i in d) { var token = d[i].movetoken; } cb(title,token); }); }; function getCategoryMembers(category,cb) { $.get('http://www.culture.si/wiki/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:'+category+'&cmlimit=500&cmnamespace=0', function (data) { var d = JSON.parse(data).query.categorymembers; var n = 0; for (var i in d) { cb(d[i].title); n++; if (n>10) break; }; }); } function movePage(from,to,token) { $.post('/wiki/api.php', { action:'move', from: from, to: to, reason: 'by script', token: token, noredirect: 'true', movetalk: 'true', format: 'json' }, function(data) { console.log(data); }); }; getCategoryMembers('DEPO',function(ti) { getMoveToken(ti, function(t,mt) { movePage(t,'Depot:'+t,mt); }); });