Browse Source

Add abandonment notice.

develop
Ben Kurtovic 6 years ago
parent
commit
952f08c024
2 changed files with 17 additions and 10 deletions
  1. +5
    -0
      README.md
  2. +12
    -10
      src/tfd_close.js

+ 5
- 0
README.md View File

@@ -1,3 +1,8 @@
__Note:__ Unfortunately, this project has been effectively abandoned. There is
enough progress here to be useful for interested parties in the future, but a
lot of things will need to be reconsidered. TFD seems to be functioning fine
anyway, but I do apologize for those I promised this script to.

This is an English Wikipedia This is an English Wikipedia
[user script](https://en.wikipedia.org/wiki/Wikipedia:User_scripts) to automate [user script](https://en.wikipedia.org/wiki/Wikipedia:User_scripts) to automate
common common


+ 12
- 10
src/tfd_close.js View File

@@ -45,6 +45,7 @@ TFD.prototype._is_merge = function() {
TFD.prototype._get_close_action_choices = function() { TFD.prototype._get_close_action_choices = function() {
// TODO: disable action options until transcluion info loads... // TODO: disable action options until transcluion info loads...
// TODO: restrictions for close result // TODO: restrictions for close result
// - ["delete", "keep", "redirect", "merge", "nomerge", "nocon", "other"];
return [{ return [{
id: "none", id: "none",
name: "Do nothing", name: "Do nothing",
@@ -60,16 +61,16 @@ TFD.prototype._get_close_action_choices = function() {
help: "The script will add {{being deleted}} to the template and " + help: "The script will add {{being deleted}} to the template and " +
"add an entry to the holding cell ([[WP:TFD/H]]).", "add an entry to the holding cell ([[WP:TFD/H]]).",
on_select: null, // TODO: auto-select "to merge" if merging on_select: null, // TODO: auto-select "to merge" if merging
on_close: null,
restrict: {}
on_close: null, // TODO
restrict: {results: ["delete", "redirect", "merge", "nocon", "other"]}
}, { }, {
id: "keep", id: "keep",
name: "Keep", // TODO: clarify? esp. for merges name: "Keep", // TODO: clarify? esp. for merges
help: "TODO",
// remove {{TFD}}/{{TFM}}, add/update {{TFD end}} on talk with result
help: "The script will remove {{tfd}} or {{tfm}} from the template " +
"and add {{Old TfD}} to its talk page.",
on_select: null, on_select: null,
on_close: null,
restrict: {}
on_close: null, // TODO
restrict: {results: ["keep", "merge", "nomerge", "nocon", "other"]} // SPLIT OFF "merge" FOR "merge target"?
}, { }, {
id: "redirect", id: "redirect",
name: "Redirect", // TODO: clarify? name: "Redirect", // TODO: clarify?
@@ -121,9 +122,10 @@ TFD.prototype._on_close_result_change = function() {


TFD.prototype._build_close_results = function() { TFD.prototype._build_close_results = function() {
if (this._is_merge()) if (this._is_merge())
var choices = ["Merge", "Do not merge", "No consensus", "Other"];
var choices = [["Merge"], ["Do not merge", "nomerge"]];
else else
var choices = ["Delete", "Keep", "Redirect", "No consensus", "Other"];
var choices = [["Delete"], ["Keep"], ["Redirect"]];
choices.push(["No consensus", "nocon"], ["Other"]);


var self = this; var self = this;
var elems = $("<div/>"); var elems = $("<div/>");
@@ -140,11 +142,11 @@ TFD.prototype._build_close_results = function() {
$("<label/>").append($("<input/>", { $("<label/>").append($("<input/>", {
name: "result", name: "result",
type: "radio", type: "radio",
value: choice.toLowerCase(),
value: choice[1] || choice[0].toLowerCase(),
change: function() { self._on_close_result_change(); } change: function() { self._on_close_result_change(); }
})).append($("<span/>", { })).append($("<span/>", {
addClass: "tfdclerk-result-option", addClass: "tfdclerk-result-option",
text: choice
text: choice[0]
})).appendTo(elems); })).appendTo(elems);
}); });




Loading…
Cancel
Save