User:Sophivorus/temp.js
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.
const prefix = 'TissueDB/Materials/'
const target = 'Synthetic skin pad';
const summary = 'Per author request, convert into redirect to [[' + prefix + target + ']]'
const wikitext = '#REDIRECT [[' + prefix + target + ']]';
const pages = [
'Tattoo Practice Skin',
];
const api = new mw.Api();
for ( const page of pages ) {
const title = prefix + page;
await api.edit( title, () => {
console.log( title );
return { text: wikitext, summary: summary }
} );
}