From 952f08c0246d6f67cb74ccd101a32a85c150399b Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 5 Jan 2018 00:17:42 -0500 Subject: [PATCH] Add abandonment notice. --- README.md | 5 +++++ src/tfd_close.js | 22 ++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index dfa57cf..8869772 100644 --- a/README.md +++ b/README.md @@ -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 [user script](https://en.wikipedia.org/wiki/Wikipedia:User_scripts) to automate common diff --git a/src/tfd_close.js b/src/tfd_close.js index 113751c..845c740 100644 --- a/src/tfd_close.js +++ b/src/tfd_close.js @@ -45,6 +45,7 @@ TFD.prototype._is_merge = function() { TFD.prototype._get_close_action_choices = function() { // TODO: disable action options until transcluion info loads... // TODO: restrictions for close result + // - ["delete", "keep", "redirect", "merge", "nomerge", "nocon", "other"]; return [{ id: "none", 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 " + "add an entry to the holding cell ([[WP:TFD/H]]).", 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", 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_close: null, - restrict: {} + on_close: null, // TODO + restrict: {results: ["keep", "merge", "nomerge", "nocon", "other"]} // SPLIT OFF "merge" FOR "merge target"? }, { id: "redirect", name: "Redirect", // TODO: clarify? @@ -121,9 +122,10 @@ TFD.prototype._on_close_result_change = function() { TFD.prototype._build_close_results = function() { if (this._is_merge()) - var choices = ["Merge", "Do not merge", "No consensus", "Other"]; + var choices = [["Merge"], ["Do not merge", "nomerge"]]; else - var choices = ["Delete", "Keep", "Redirect", "No consensus", "Other"]; + var choices = [["Delete"], ["Keep"], ["Redirect"]]; + choices.push(["No consensus", "nocon"], ["Other"]); var self = this; var elems = $("
"); @@ -140,11 +142,11 @@ TFD.prototype._build_close_results = function() { $("