User:Bot doubleredirects/Gadget-DoubleRedirectFixer.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 40: | Line 40: | ||
if (page.ns) { | if (page.ns) { | ||
const namespacePrefixes = { | const namespacePrefixes = { | ||
4: " | 4: "chabadpedia:", | ||
6: " | 6: "File:", | ||
10: " | 10: "Template:", | ||
12: " | 12: "Help:", | ||
}; | }; | ||
return namespacePrefixes[page.ns] ?? ""; | return namespacePrefixes[page.ns] ?? ""; | ||
| Line 59: | Line 59: | ||
bot: true, | bot: true, | ||
title: title, | title: title, | ||
text: `# | text: `#REDIRECT [[${target}]]`, | ||
}); | }); | ||
mw.notify(`\nstatus:${title} succes`); | mw.notify(`\nstatus:${title} succes`); | ||
| Line 98: | Line 98: | ||
if (!userGroups.includes("bot") && !BOT_USERS.includes(userId)) return; | if (!userGroups.includes("bot") && !BOT_USERS.includes(userId)) return; | ||
if (pageName !== " | if (pageName !== "Special:DoubleRedirects") return; | ||
const num = prompt("? כמה הפניות כפולות להציג", 0); | const num = prompt("? כמה הפניות כפולות להציג", 0); | ||