Wikipedia talk:WikiProject User scripts/Scripts/CloseAFD.js

Protected edit request on 2 December 2014 edit

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}} (etc) 02:32, 2 December 2014 (UTC)Reply

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)Reply
  • 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}} (etc) 11:41, 2 December 2014 (UTC)Reply
  • 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:
    1. Relist 1
    2. Relist 2
    3. Relist 3
    4. Relist 4
    5. Relist 5
    6. 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}} (etc) 13:11, 2 December 2014 (UTC)Reply
  • Okay, striping cats in close looks good. — {{U|Technical 13}} (etc) 13:27, 2 December 2014 (UTC)Reply
  • 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}} (etc) 13:38, 2 December 2014 (UTC)Reply
  Done — Martin (MSGJ · talk) 21:02, 9 December 2014 (UTC)Reply