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

Content deleted Content added
use library functions, unquoting of group name
m bugfix: when using the LDR convert function on multiple groups, only the first use worked
Line 82:
// Semi-global variables (private to this script)
var editForm; var refsDiv; var refsH2; var mainTextbox; var refsTextbox;
var randPrefix; var messages; var refsButton; var convertButton;
 
// Extend the string object with new methods
Line 397:
function refsButtonHandler() { // Called when script activated by button click
// Both buttons should disappear
if(convertButton){
this.parentNode.removeChild(this.nextSibling);
this convertButton.parentNode.removeChild(thisconvertButton);
}
if(refsButton) {
this refsButton.parentNode.removeChild(this.nextSiblingrefsButton);
}
// Do the actual segregation work and save the random prefix
Line 457 ⟶ 461:
// The first button should disappear
if(refsButton) {
this refsButton.parentNode.removeChild(this.previousSiblingrefsButton);
}
// Do the actual segregation work and save the random prefix
Line 528 ⟶ 534:
// Make the "segregate" button
var refsButton = window.document.createElement("input");
refsButton.type = "button";
refsButton.value = messages.buttonText;
Line 535 ⟶ 541:
// Make the "convert" button
var convertButton = window.document.createElement("input");
convertButton.type = "button";
convertButton.value = messages.buttonConvertText;