User:Bot doubleredirects/Gadget-DoubleRedirectFixer.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 55: | Line 55: | ||
*/ | */ | ||
const extractAnchorFromContent = (content) => { | const extractAnchorFromContent = (content) => { | ||
const match = content.match(/# | const match = content.match(/#REDIRECT\s*\[\[[^\]]+?(?:#(.+?))?\]\]/); | ||
return match?.[1] ? "#" + match[1] : ""; | return match?.[1] ? "#" + match[1] : ""; | ||
}; | }; | ||
| Line 104: | Line 104: | ||
// **השורות עם "tags" הוסרו לחלוטין כאן.** | // **השורות עם "tags" הוסרו לחלוטין כאן.** | ||
title: title, | title: title, | ||
text: "# | text: "#REDIRECT [[" + target + "]]", | ||
summary: "בוט: מתקן הפניה כפולה ל- [[" + target + "]]", | summary: "בוט: מתקן הפניה כפולה ל- [[" + target + "]]", | ||
}); | }); | ||