User:PleaseStand/segregate-refs-dev.js: Difference between revisions

Content deleted Content added
bugfix
finishing touches
Line 58:
"migration. If there is consensus to make the conversion, click OK to " +
"do so.",
groupPrompt: "Please enter the unescaped name of a group (leave blank if " +
"unsure).",
refsHeader: "Inline footnotes",
convertHeader: "Generated refs list",
Line 63 ⟶ 65:
"Do not use for conversion purposes. -->\n\n",
refsCommentComplete: "<!-- Converted to LDR format\n" +
" using [[User:PleaseStand/References segregator]] -->\n\n",
convertFurther: "This script has done most of the work. However, you still " +
"need to do the following:\n\n* Insert the refs list in the new textbox " +
"into the proper place in the wikitext.\n* If converting a special " +
"group, optionally remove the group attributes.\n*Replace all " +
"autogenerated names with human-generated names.\n\nYou can do the above " +
"with the Find/Replace command in many text editors. (Always use the " +
"quoted form of the attributes.) Then, paste the text back into the edit " +
"form and save the page."
};
 
Line 443 ⟶ 453:
// Display warning
if(!window.confirm(messages.convertRefsWarning)) {
return false;
}
// Which group?
var group = window.prompt(messages.groupPrompt, "");
if(group === null) {
return false;
}
Line 450 ⟶ 466:
// Do the actual segregation work and save the random prefix
var segFormat = segregateRefs(mainTextbox.value, true, ""group);
if(!segFormat) {
return false;
Line 491 ⟶ 507:
segFormat.refCodes.join("\n\n");
}
// Show the further instructions.
window.alert(messages.convertFurther);
// Don't submit form