40,275
edits
m (fix message) |
m (+docs) |
||
if (!page_name.startsWith('Coppermind:Artists/')) { return; }
const edit = document.querySelector('textarea')
// show pending progress
mw.notify('scanning for new files linking to '+ page_name).then(function(note) {
// perform API query
action: "query",
format: "json",
const pid = Object.keys(resp.query.pages)[0]
const new_files = []
// hide progress notification
note.close()
// determine which new files link here
if (!resp.query.pages[pid].linkshere) { mw.notify('no files link to '+ page_name); return; }
const pages = resp.query.pages[pid].linkshere.map(function(page) { return page.title.split(':')[1] })
|