Content deleted Content added
fix some bugs |
m Maintenance: Fixing deprecated call to addPortletLink (mw:ResourceLoader/Migration_guide_(users)#addPortletLink) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 346:
}
boldface_text = boldface_text.replace(/(<([^>]+)>)/ig,""); // remove HTML tags
// window.alert("List item " + list_item_index + " has boldface text: " + boldface_text + "\n");
Line 352:
num_support_votes++;
reported_string = num_support_votes + ". " + boldface_text + " — " + user_name + "\n";
// window.alert(reported_string);
support_votes[num_support_votes-1] = reported_string;
} else if (boldface_text.match(/neutral/ig)) {
Line 383:
num_votes = num_support_votes + num_oppose_votes + num_neutral_votes + num_ambiguous_votes;
Line 399:
alert_string += "\t one Oppose !vote\n";
oppose_vote_summary = "There was one Oppose !vote:\n\n";
} else if (
alert_string += "\t " + num_oppose_votes + " Oppose !votes\n";
oppose_vote_summary = "There were " + num_oppose_votes + " Oppose !votes:\n\n";
Line 406:
alert_string += "\t one Support !vote\n";
support_vote_summary = "There was one Support !vote:\n\n";
} else if (num_support_votes>1) {
alert_string += "\t " + num_support_votes + " Support !votes\n";
support_vote_summary = "There were " + num_support_votes + " Support !votes:\n\n";
Line 413:
alert_string += "\t one Neutral !vote\n";
neutral_vote_summary = "There was one Neutral !vote:\n\n";
} else if (num_neutral_votes>1) {
alert_string += "\t " + num_neutral_votes + " Neutral !votes\n";
neutral_vote_summary = "There were " + num_neutral_votes + " Neutral !votes:\n\n";
Line 420:
alert_string += "\t one ambiguous !vote\n";
ambiguous_vote_summary = "There was one ambiguous !vote:\n\n";
} else if (num_ambiguous_votes>1) {
alert_string += "\t " + num_ambiguous_votes + " ambiguous !votes\n";
ambiguous_vote_summary = "There were " + num_ambiguous_votes + " ambiguous !votes:\n\n";
Line 426:
if ((num_notes + num_comments + num_questions) == 1) {
alert_string += "\nIn addition, there was:\n";
} else if ((num_notes + num_comments + num_questions)>1) {
alert_string += "\nIn addition, there were:\n";
}
Line 432:
alert_string += "\t one Note\n";
note_summary = "There was one Note:\n\n";
} else if (num_notes>1) {
alert_string += "\t " + num_notes + " Notes\n";
note_summary = "There were " + num_notes + " Notes:\n\n";
Line 439:
alert_string += "\t one Comment\n";
comment_summary = "There was one Comment:\n\n";
} else if (num_comments>1) {
alert_string += "\t " + num_comments + " Comments\n";
comment_summary = "There were " + num_comments + " comments:\n\n";
Line 446:
alert_string += "\t one Question\n";
question_summary = "There was one Question:\n\n";
} else if (num_questions>1) {
alert_string += "\t " + num_questions + " Questions\n";
question_summary = "There were " + num_questions + " Questions:\n\n";
Line 543:
} // closes function summarizeFAC()
mw.util.addPortletLink('p-cactions', 'javascript:summarizeFAC()', 'FAC', 'ca-fac', 'Summarize FAC votes', '!', '');
});
|