Wikipedia talk:WikiProject User scripts/Scripts/CloseAFD.js
Appearance
Protected edit request on 2 December 2014
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please merge the history of changes to Wikipedia:WikiProject User scripts/Scripts/CloseAFD.js/sandbox.js, which has been fairly thoroughly tested via my vector.js page, with the history of this page. These changes address the addOnloadHook deprecation and adds some functionality and improved coding/jQueryification to the script. @Krinkle and He7d3r: Just pinging a couple other editors I know can read javascript that may be able to improve this script further or okay the changes I've made. — {{U|Technical 13}} (e • t • c) 02:32, 2 December 2014 (UTC)
- I've updated addPortletLink to mw.util.addPortletLink per the manual. I'm familiar with that part of the MediaWiki JS code as I had to something similar in User:Mr. Stradivarius/chessboardfix.js a while back, but I'm still relatively new to the other things in the script, so I won't enact this request myself. (Also, I haven't tested the code yet.) — Mr. Stradivarius ♪ talk ♪ 09:06, 2 December 2014 (UTC)
- Thanks, I'll test your changes in a few ours and make any needed tweeks. I have a few more improvements planned, but wanted to get this part done first and more quickly to get the script to stop adding the depreciation warning to the console. :) — {{U|Technical 13}} (e • t • c) 11:41, 2 December 2014 (UTC)
- Had to make a few more tweaks for the relisting section to fix the counter (it broke when I changed the template as it was counting based on the old template, it's now fixed to count using the new method and is backwards compatible for I'd say a month is good until all old relist template subst:itutions have been archived for sure). You can see the results in the history of the sandbox of me using the script to relist 5 times and then close no consensus:
- Relist 1
- Relist 2
- Relist 3
- Added a reason for relisting
- Added page to Category:AfD debates relisted 3 or more times sorted as "3"
- Relist 4
- Added a reason for relisting
- Added page to Category:AfD debates relisted 3 or more times sorted as "4"
- Relist 5
- Added a reason for relisting
- Added page to Category:AfD debates relisted 3 or more times sorted as "5"
- Close
- Looking at these revisions myself, I can see the script should remove pages from the categories upon closing. I'll make that modification and be back with a new diff. — {{U|Technical 13}} (e • t • c) 13:11, 2 December 2014 (UTC)
- Okay, striping cats in close looks good. — {{U|Technical 13}} (e • t • c) 13:27, 2 December 2014 (UTC)
- Okay, added the ability to add a comment outside of the result. no comment and comment (This is a comment.). I'm done making changes for now until this request is completed. Then I'll work on adding additional features and tweaks. Thank you. — {{U|Technical 13}} (e • t • c) 13:38, 2 December 2014 (UTC)
- Done — Martin (MSGJ · talk) 21:02, 9 December 2014 (UTC)