User talk:Jnothman/afd helper
Excuse the intrusion, but I took the liberty of trying this out... The mechanics of it all work fine in Firefox, however you'll need to edit the script to paste in ~~~~ - currently it's putting in a static string consisting of you name and a past date/time instead! Thanks/wangi 15:10, 1 November 2005 (UTC)
- LOL!! whoops =P That's what I get for writing a script at that time of night... Fixed. Thanks. jnothman talk 00:52, 2 November 2005 (UTC)
Bugs?
editI just tried it out, and it seems to work in Safari. I did run into some problems, though. First, I thought the first window that popped up was for the vote and the reason, so I typed it in like normal (three ' marks, Delete, three ' marks, my reason). Then I got to the second window, where it asks for the reason. Whoops, says I. I hit cancel, and the script saved my vote anyway. It put the edit summary "undefined" in that box. See here for details.
So, all in all, a useful tool. But needs a user manual, and probably shouldn't save on a "cancel". —BrianSmithson 03:39, 2 November 2005 (UTC)
- Sorry, I tested the cancel in Opera. Thanks for trying in safari. I need a more defined way to test for an undefined value in javascript. Do you know? I'll start looking now.
- I also know it needs a little more documentation, but it does say on the "vote" prompt, "eg delete, keep, merge". Sorry about that and thanks again. --jnothman talk 04:10, 2 November 2005 (UTC)
- Sorry, but I don't know the first thing about Javascript. Also, I hope I didn't come off as too negative on the tool — I think it'll be quite useful once you get the kinks ironed out! —BrianSmithson 04:13, 2 November 2005 (UTC)
- Now should be patched. Please try in Safari. Make sure to refresh the script in the browser's cache first, by refreshing the page here. --jnothman talk 04:26, 2 November 2005 (UTC)
- Okay, seems to be working fine in Safari now. The cancel feature works nicely without saving. Also, I jump between Macs running Safari and PCs running IE, and the tool appears to be working for me on both platforms with no issues. Now you just need to expand its domain to include all the other votes for deletion pages! —BrianSmithson 14:03, 2 November 2005 (UTC)
I tested it in IE and have only one issue. Either you have it set to insert two line breaks or the previous voter had a line break after his vote. Either way I would think double-spacing votes would make it more difficult for non-automated voters, so maybe if you could make it detect and remove linebreaks in excess of one? Otherwise it works fine. — FREAK OF NURxTURE (TALK) 13:32, 2 November 2005 (UTC)
- This may be a bug in IE's implementation of String.substr(). Unfortunately, I'm not in Windows to test my possible patch, then. I do test whether the text so far ends in a line-break, and if not I add one. That's the reason for the double line. But the test itself may not be working in IE. Before you test it, refresh your browser cache of here. --jnothman talk. jnothman talk 14:29, 2 November 2005 (UTC)
- Double linebreak issue seems to be fixed. Thx. — FREAK OF NURxTURE (TALK) 00:38, 3 November 2005 (UTC)
This thing's fun. I've had one problem where I was directed to that 'faut fel fallo... Wikipedia has a problem' page, and went back to find my vote had been posted twice, here. Any ideas why this might be? The edit summary makes it look as if I did it on purpose. Flowerparty■ 14:42, 2 November 2005 (UTC)
- Probably what happened is when you hit back, it had already got the modified page, but the browser ran the script again, and so added the vote again. I can put a test in something along the lines of, if the edit summary hasn't been changed yet, then add the vote. That should stop duplicates. It's on my todo list. jnothman talk 01:07, 3 November 2005 (UTC)
Apostrophe bug
editIf the page title contains an apostrophe, it closes the string literal and doesn't work. Here's the error from Firefox:
Error: missing ) after argument list Source File: javascript:afd_vote('http://en.wikipedia.org/w/index.php?title=Wikipedia:Articles_for_deletion/Copernicus%27_nationality&action=edit§ion=1') Line: 1, Column: 95 Source Code: afd_vote('http://en.wikipedia.org/w/index.php?title=Wikipedia:Articles_for_deletion/Copernicus'_nationality&action=edit§ion=1')
So you'll need to make the following change:
na.href = "javascript:afd_vote('"+anchors[i].href.replace(/'/, "\'")+"')";
I think that should work, but you should test. --howcheng [ talk • contribs • web ] 17:52, 2 November 2005 (UTC)
- Thanks- I did think about that when coding, but had for some reason ignored it in the end! Do I need to handle backslashes as well, or will there be no articles with backslashes. There are a couple of potential problems with your regex (I forget whether "\'" will be treated as "'" in Javascript; and it would only match once) so I'm using .replace(/'/g, '\\\). jnothman talk 00:32, 3 November 2005 (UTC)
Suggestions
editHi, Nice tool - works fine. Not sure how difficult the following would be but FWIW
- Drop-Down list of Votes (Delete, Keep, Rewrite, Merge, Comment spring to mind)
- Sig - see below for what I usually paste in. I could probably just customise your script myself to do that.
- Edit Summary would also be good
Now what would be excellent would be something to automate the 3-step process of nominating for Aft (the {{subst:afd}} etc) but that's substantially more complex.
Dlyons493 Talk 14:43, 2 November 2005 (UTC)
- Can your sig not be applied with the standard ~~~~? I guess I could make a variable for user signature, which can be modified in your own monobook.js, without much trouble. By default it would be ~~~ followed by ~~~~~ but you could set the first part to be, for instance, 'Dlyons493 Talk'.
- It's not a big issue - I could mod a local copy of your script to hardcode that string.
- Drop-down list of votes isn't nicely supported by Javascript. I could make the script somewhat more complicated and make an HTML form with drop-down list instead of the current prompt dialogs. An idea I prefer, for ease, is to make one-letter (or number) shortcuts for the common options, ie typing d will give delete, k for keep, m for merge.
- Easy is good - common shortcusts sounds fine
- I'm not sure what you mean by edit summary would be good: currently the edit summary is your vote.
- Sorry that was a bit too short to be understandable - I think you worked out what I meant below!
- Automating AFD adding would probably be a different script altogether, but it's a possibility. I won't put it for a todo on this page, but on my user homepage... Also, if reforms ever come in, this is less likely than voting to remain similar. I've changed my mind and it is now on the afd helper todo list.
- I have added 1 & 2 to a todo list. jnothman talk 00:51, 3 November 2005 (UTC)
Howcheng's suggestions
edit- Make it so that when clicking the "vote" link from the AFD nomination subpage (instead of the main AFD log) a new window is NOT opened.
- Assign a name to the opened window (using
window.open(url, "afd_helper");
so that voting doesn't always spawn a new window; you can keep the opened window there and repeated voting will continue to stay in that window. Continuously closing windows is a pain in the ass. - Second Dlyons493's suggestion for having a third dialog box for the edit summary, which defaults to your vote.
--howcheng [ talk • contribs • web ] 16:43, 2 November 2005 (UTC)
- Okay, that can be done. On todo.
- Fair enough. I'll do that right away
- Oh, that's what he meant! Also on todo.
- jnothman talk 00:51, 3 November 2005 (UTC)
I agree is it a good tool and I agree with Dlyons and Howcheng suggestons --JAranda | watz sup 17:20, 2 November 2005 (UTC)
Changing AFD Helper and YOU (er, me)
editForgive my ignorance, but this is the first time I've ever monkeyed with my Wikipedia monobook setting file thing. Whenever the script is updated, do I need to copy and repaste the thing in? Or is the code I've already pasted in sufficient? Thanks . . . . —BrianSmithson 02:44, 3 November 2005 (UTC)
- The code you've already pasted in is fine. When the script is updated, though, you need to visit here to refresh your browser's cache of the script. jnothman talk 03:02, 3 November 2005 (UTC)
AFD Nomination helper
editI've just created an experimental version of the afd helper to nominate pages for AFDs. I have NOT tested it, as I don't know pages to test it on! If you refresh the cache, you should see on the left (in the toolbox) a link called "Nominate AFD" for pages in the main workspace. If you find a page that should be nominated for an AFD, try clicking the link, fill in the details, and your page should split into three frames, to perform each of the three operations. Thanks for any feedback. jnothman talk 09:35, 3 November 2005 (UTC)
- I've gotten the special "Nominate AFD" to show up, but it doesn't seem to work in Safari. I found an article and clicked that link in the toolbox, but it only brought up a blank page. (I added the edit summary option to the vote helper, and that works fine.) —BrianSmithson 14:56, 3 November 2005 (UTC)
- Firstly, thanks. You're going to have to refresh this script due to a silly bug. The other bug is that Wikipedia doesn't like being stuck in frames, and I don't know quite what to do about this. For now I'll make it (to your distate) that the three pages open up in different windows, regretfully. At a later stage, I'll get them to close automatically, or just to go through the three-stage process in one window, but this'll involve a bit more work, and bring in many more potential bugs. jnothman talk 15:37, 3 November 2005 (UTC)
I tried this out yesterday and was pretty pleased with it for short AFD nominations. One suggestion: in the edit summary for the deletion log, wikilink the article title ("Nominating [[article]] for deletion"). I don't put most of my nominations on my watchlist so I often go back through my contributions to see what happened to them; a red/not-red link in the contributions page would make it easy to identify. --howcheng [ t • c • w • e ] 17:01, 10 November 2005 (UTC)
- Yes I've been considering doing this, too, but haven't got around to it (not that it's hard). I've hopefully made the necessary change (for a wikilink in the edit summary when posting on the log page), but you'll have to refresh the script as per the main afd helper page. jnothman talk 02:19, 11 November 2005 (UTC)
I just tried this out: it works great except it would be nice if it automatically signed my name when nominating an article. Unless it's meant to and I just did something wrong... Hitchhiker89 22:01, 13 November 2005 (UTC)
Random bug
editFor some reason, every page on the November 4 AFD has the "Edit Vote" option but one: Wikipedia:Articles for deletion/Victoria Carmichael. Just thought I'd bring it to your attention. I wonder what it is about this particular nomination that keeps it from displaying the extra options correctly? —BrianSmithson 21:32, 4 November 2005 (UTC)
- At least at the time I looked at it, the only without "vote" next to it was The Fight but it was entered twice into the log, which may have cause it, as the edit link wasn't correct either. Basically, if the Edit link is correct, the vote link shoould appear. jnothman talk 13:08, 5 November 2005 (UTC)
Another one: Now when I got to the AFD page, I have the option to "EditVoteVoteVote". Any idea what's going on? —BrianSmithson 16:57, 7 November 2005 (UTC)
Edit vote vote vote
editI changed the way that the script gets loaded yesterday and should have noted it here. Now what's happening is the script is being loaded twice if you have the old text in your own monobook.js. I've taken out a few lines on the main page here from what you're meant to paste in your monobook.js. Please update your copies and remember to refresh. jnothman talk 23:36, 7 November 2005 (UTC)
- I repasted the script into my monobook and refreshed, but now I have no vote option at all. I'm pretty sure I did everything right . . . . —BrianSmithson 04:37, 8 November 2005 (UTC)
- Not sure what changed, but immediately after I posted the above comments, the "VoteVoteVote" came back. —BrianSmithson 04:40, 8 November 2005 (UTC)
- Confused then. Just to be sure, the page you need to refresh is this one. jnothman talk 06:45, 8 November 2005 (UTC)
- Seems to be working now. I think it was a cache thing. —BrianSmithson 21:11, 9 November 2005 (UTC)
- Not sure what changed, but immediately after I posted the above comments, the "VoteVoteVote" came back. —BrianSmithson 04:40, 8 November 2005 (UTC)
small and /small when nominating an article
editI'm not sure if this is a problem with the AFD helper or with the AFD template, but I had a problem with an HTML code not closing properly when I used the AFD nomination helper. See this edit. —BrianSmithson 22:47, 14 November 2005 (UTC)
- It's not afd helper's fault, rather a current bug in Wikipedia settings. See Wikipedia:Help desk#HTML tidy and Wikipedia talk:Articles for deletion#AFD template error. jnothman [[User_talk:jnothman|<sup>talk</sup>]] 06:10, 15 November 2005 (UTC) <-- the same bug does that
Typo
editI think there's a typo in December - I'm currently seeing 2005 Decemeber 2. But it's a most useful tool!
Users, please refresh automod.js
editCan all users of afd helper please refresh this page due to a fix of a spelling error in "December". Thanks. jnothman talk 10:49, 3 December 2005 (UTC)
Minor bug
editI think it doesn't handle an apostrophe in the title e.g. clicking vote on the Afd page for Suing for Peace: A Guide for Resolving Life's Conflicts has no effect. Dlyons493 Talk 20:36, 16 December 2005 (UTC)
- Yes, it was mentioned above and supposedly rendered fixed. It seems that rendering was not complete and should now be resolved. Thanks. jnothman talk 13:51, 17 December 2005 (UTC)
Two minor bugs
editI have noticed these:
- "February" is misspelled in the source code
- You should remove the "vote" link after I use it to discourage somebody from accidentally voting twice. (An option to delete the whole section would be nice)
Yours, r3m0t talk 17:12, 18 December 2005 (UTC)
- Thanks for telling me that before February! Must have been a really late night when I wrote those months up: I had misspelled December earlier. Which, of course, caused strife when December hit!
- Removing the vote tag... is possible if a little difficult. I'll add it to the Todo list. There is a script, the AFD Show/Hide tool which I haven't tested myself, but seems to allow one to hide and show AFDs on the log page. I do intend sometime in the future to add cookie support to that script so that when you hide an AFD on one day it remains hidden when you look the next day. You rightly suggest, though, that this all could be incorporated together in one script. jnothman talk 22:39, 18 December 2005 (UTC)
Ampersand bug
editIt seems that AfD helper gets confused when you click "vote" on an article containing and apersand (&). It breaks the article name at the ampersand, and creates a new AfD subpage for the truncated article name. Segv11 (talk/contribs) 01:53, 8 January 2006 (UTC)
- I am now very confused about how URL escaping works in JavaScript, but assuming it works consistently across browsers (which can't be promised), this bug should now be fixed. You'll have to refresh the script in your browser page as indicated numerous times here. jnothman talk 02:10, 8 January 2006 (UTC)
- Hmmm, I've refreshed the cache and it's still acting up. Perhaps Wikipedia is caching it too. I'll clear by cache and try again tomorrow. I'm using Safari 2.0.2, BTW, if that makes any difference. Segv11 (talk/contribs) 05:45, 8 January 2006 (UTC)
- Of which page are you refreshing the browser cache? To be sure, refresh [1] in the browser, if it will let you open to view it at all. jnothman talk 05:54, 8 January 2006 (UTC)
vote vote
editHi. New user of this tool here, seems a great idea (although a box that had all the stuff on it at once, instead of one after another, might be nicer). One nit, I am getting "editvote vote" as the link (doubled vote). I see above where you addressed a similar bug, but as a new user do I still need to refresh things? I am using Firefox 1.07 on a Thinkpad T42 running Windows XP. Thanks again for the tool. ++Lar: t/c 01:15, 16 January 2006 (UTC)
Bad redirect behaviour
editMe again... I tried to vote on Wikipedia:Articles for deletion/List of Buffyverse Wikipedia articles but it's a redirect. The script may not handle these very well, I noticed a number of other users had votes there too (scope the history, I cleaned them out so you may have to go back a version or two). I suspect at least one is a user of the tool since you left him a message inviting his use. I got confused and voted 3 times on that page, finally realising I was all confused. I moved the stray votes by hand. Thoughts? ++Lar: t/c 01:53, 17 January 2006 (UTC)
Afd helper stopped working on firefox!
editHi, I've been using AFD helper on firefox for ages and it's been working fine. Now it suddenly stopped working, I have tested it on internent explorer and it works fine. When trying to use it on firefox, the dialogue box for voting pops up, but I noticed it doesn't have all the options that are present in the one when using IE. After choosing 'delete' etc and the other options, the box closes, but the other window does not popup. As I said, I have been using it fine before, so it shouldn't be any of my browser settings. Any ideas? Thanks, Mushintalk 17:40, 23 January 2006 (UTC)
- Okay I've narrowed it down to somewhere in my .js scripts. I removed all of them apart from afd helper, and it then it worked. I'll try adding them sequentially so I can find out which is interfering with it. Mushintalk 17:51, 23 January 2006 (UTC)
- Right that took a while as I'm using quite a few scripts! It turns out the afd helper script would not work when the script Edit Top was being used. This adds an edit link to the top section of an article. Have no idea why they clash, but hopefully you might be able to fix it! Thanks. Mushintalk 18:05, 23 January 2006 (UTC)
- Try Add edit section 0. It does the same thing and it's compatible with afd_helper. howcheng {chat} 07:42, 24 January 2006 (UTC)
- Right that took a while as I'm using quite a few scripts! It turns out the afd helper script would not work when the script Edit Top was being used. This adds an edit link to the top section of an article. Have no idea why they clash, but hopefully you might be able to fix it! Thanks. Mushintalk 18:05, 23 January 2006 (UTC)
This is the most monumentally bad idea of all ideas ever. This idea is so bad it slaps nuns for fun and then shows the pictures to their mum
editAs it appears to emphasise the "voting" aspect of AfD. Wikipedia doesn't need people to make lots of short contributions to deletion discussions, and the placing of images based upon a reductionists "vote" is right off the map. What is really helpful is when someone takes a nice long time to think about the outcome, perhaps do some research, and write a nice long clear explanation of what they think. It's great if you don't even say explicitly "keep" or "delete."
Please, I beg everyone to stop using this. Type it out by hand. Use non-standard verbs for your recomendations. Every time someone uses a voting symbol, I kill a kitten. With a hammer. I know that means that it will take longer and you'll not be able to participate in as many discussions, but you'll participate in them more deeply. Guys like Geogre and Encephelon don't drop into that many deletion debates, but when they do people listen.
brenneman{L} 13:29, 18 May 2006 (UTC)
- I came here to post a question about the icons, which I couldn't get working in afd helper. I think I've found out why - Template:Voting icons has been deleted. The justification for deleting it is the same as Aaron Brenneman expresses above. I'm sorry, dude, but their arguments are unassailable. It's a shame for me because I like the shiny icons, and it's a real shame for you - you must have put a lot of work into that script - but it does turn a discussion into a vote, and works against Wikipedia:Consensus, as explained in Wikipedia:Voting is evil. --Hughcharlesparker 20:22, 22 May 2006 (UTC)
Custom signature doesn't work...
edit... or at least not for me. Did I do something wrong in my monobook.js? B.t.w., thanks for this useful script! Sandstein 11:17, 13 August 2006 (UTC)
Histoy Bug
editWhen I was on the history page of an article and pressed "nominate this page for deletion", it nominated pagename-history for deletion. Maybe something that should be fixed (ie, nominate page, not page-history)? -Royalguard11(Talk·Desk) 05:45, 23 September 2006 (UTC)
- "Nominate this page" shouldn't appear on History pages. Can confirm that it does? jnothman talk 12:14, 29 December 2007 (UTC)
Speedy keep
editI've noticed that there's not a short code for speedy keep. The most obvious of sk is already used for strong keep. Any chance we can come up with something for this? -- Thewinchester (talk) 07:14, 10 April 2007 (UTC)
Problem with AfD nomination
editThis is a great script for voting, but I've noticed some problems in nominating AfD's. In this diff, I used the tool to nominate, and it placed the AfD at the bottom of the page, despite instructions stating that all new AfD's should go to the top. If this could get fixed, it would be greatly appreciated. - G1ggy Talk/Contribs 04:37, 14 June 2007 (UTC)
- With some annoying hacks, this finally has been fixed. I hope. jnothman talk 13:02, 29 December 2007 (UTC)
Bug in afdhelper
editSince you're using associative arrays you need to be using Object() instead of Array()
Code showing up in prompt dialogs
editI'm noticing code showing up in the prompt dialogs for both vote and reason (the ones that have shortcuts). The list is followed by JavaScript code from within the tool. Can this be removed? It just showed up between this past June and now (sorry I can't be more specific, I just haven't been using it much lately). Tuvok[T@lk/Improve me] 00:41, 16 October 2007 (UTC)
reason optional
editReason should not be optional. a mere keep or delete without a reason doesnot help the discussion. The person making the !vote is expected to give a policy reason for his opinion. DGG (talk) 05:44, 30 December 2007 (UTC)
Modern
editAny change this is compatible with the modern.js skin? I gave it a whirl to no avail. *sniff* Liking the modern look *sniff* makes me a second-class wikipedian. *sniff* ;) ~ Amory (user • talk • contribs) 05:10, 28 June 2009 (UTC)
removes + symbols from comments
editThis is a really useful script, but it seems to remove + symbols from comments, this makes posting links to google news et al impossible as
http://news.google.com/archivesearch?&as_src=-newswire+-wire+-presswire+-PR+-press+-release+-wikipedia&q=%22Tyler+Yarema%22
becomes
http://news.google.com/archivesearch?&as_src=-newswire -wire -presswire -PR -press -release -wikipedia&q=%22Tyler Yarema%22
which displays as
-wire -presswire -PR -press -release -wikipedia&q=%22Tyler Yarema%22
any chance of fixing this?--UltraMagnusspeak 13:37, 15 October 2009 (UTC)
cant use program
editI cant use your program its too hard walderslade watercircus presents.... dum dum dummm THE AMAZING fisheyyyy MAN!! ba baaaaa bannnn booom bom bom!! we hope you have a great time!! BOOOOOOM!!!!!! xx (talk) 19:33, 22 July 2010 (UTC)
One bug, one annoyance
editThanks for the cool tool, it's much easier than having to manually edit AfD, a method prone to edit conflicts. A bug I noticed is that the first time I used AfD helper, I used a shortcut(d for delete, I believe) and the letter showed, rather than the word it's a shortcut for. An annoying thing I noticed is that, in both Firefox 10 beta and 11 beta, the AfD opens in a new windows upon voting, rather than in a new tab like usual. I checked my Firefox settings, and it is set to open new windows in tabs, so I think it's a problem with the window.open in the JS. I would appreciate it if you could work on these issues. Thanks.--Yutsi Talk/ Contributions 15:52, 7 February 2012 (UTC)