User talk:Ebrahames/Advisor
Script
Hey! So the script is not finished, but ready to use now, right? I find most of the ideas you've implemented extremely handy and would like to use the script too :) How exactly do I add it to my monobook, by copying the contents of User:Cameltrader/A.js? Thanks! Todor→Bozhinov 13:21, 18 September 2006 (UTC)
- The script is not as usable as I'd want it to be, but you can certainly do some quality assurance. :) If you copy the contents of A.js into your monobook.js, you will not be able to benefit from changes I make. Better do the following, as User:Lupin puts it:
“ | Copy the following content into your monobook.js file. After it is saved, press CTRL+F5 to reload the monobook.js file. The "m" in "monobook.js" must be lowercase or this won't work! [...] Save the page and follow the instructions above the edit window to force-reload the page and clear your browser cache. | ” |
{{subst:js|User:Cameltrader/A.js}}
- I believe the script would not interfere with other scrpits you use. I'll add the instructions to my user page later. --Cameltrader 18:21, 18 September 2006 (UTC)
- Wow, I just checked the script out, it works perfectly and does a tremendous job! Big thanks for creating it! Todor→Bozhinov 20:18, 18 September 2006 (UTC)
- Thanks for the thanks. Are you using Internet Explorer or a Gecko-based browser (Firefox, Netscape...)? Or Opera? I only tested Galeon and Firefox on Debian. --Cameltrader 20:57, 18 September 2006 (UTC)
- I'm using Firefox and Win XP. As far as I can tell everything's working great. Todor→Bozhinov 13:14, 19 September 2006 (UTC)
- Thanks for the thanks. Are you using Internet Explorer or a Gecko-based browser (Firefox, Netscape...)? Or Opera? I only tested Galeon and Firefox on Debian. --Cameltrader 20:57, 18 September 2006 (UTC)
- Wow, I just checked the script out, it works perfectly and does a tremendous job! Big thanks for creating it! Todor→Bozhinov 20:18, 18 September 2006 (UTC)
Adviser not working
Your adviser script isn't working. I click on the suggestions and nothing happens. Nothing is highlighted. I click "fix" and nothing happens. If I click fix twice then the suggestions vanishes but nothing is changed. There seems to be some error in your code. Perhaps you could fix it. Wikidudeman (talk) 16:34, 5 October 2007 (UTC)
Advisor.js
Hi, Cameltrader! Just wanted to thank for for the Advisor script and to make a request. I realize that the script did not generate much interest and only a handful of people use it, but perhaps, if it is not too much trouble, you would consider adding a feature to convert all Unicode entities present in the article being edited? From what I gather, that should not be terribly difficult.
Another thing that would be helpful is to add a non-breaking space before mdashes and ndashes if there was a regular space there originally.
By the way, I don't have the problems Wikidudeman describes above, except for the part when I click on a suggestion and nothing happens (true in IE and Opera; I have not tried Firefox). Fixes themselves are working just fine.
Again, thanks for the great script! I find it far more helpful than other automated tools, because it is so much more transparent. Best,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 17:51, 26 November 2007 (UTC)
- Thanks for considering my request! What I meant by "converting Unicode entities" is to change escapes to the actual characters (so "́ ;" would become ́, for example).
- As for usefulness of mapping шш and щщ to [[ and ]], I honestly don't know what to tell you. I myself am so used to constant switching between three different keyboard layouts all the time that I do not find having to switch layouts to enter [[ and ]] a bother at all. Nor do I contribute to the Russian Wikipedia much, really; I am mostly active here. Folks used to mostly typing in Russian might find the feature useful, but you'd probably be better off asking them; they may have very well already implemented something similar.
- Again, thanks for your consideration! The more I use the script, the more I like it. The only serious bug I've found so far is that the script should not be fixing mdashes and ndashes in image names, because it breaks the links, but I've only run into this once. Best,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:59, 28 November 2007 (UTC)
- Regarding this, I'd say the second space should not be a non-breaking one. It is a problem when an mdash is wrapped to start a new line, but there really is no problem when that happens to the word following the mdash. But, thanks for the upgrade all the same! Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:06, 3 December 2007 (UTC)
- It's a pity you don't have means to fix the IE problem. I, unfortunately, am stuck with this abomination at work, so being able to select relevant text would have been handy. Oh well, it's nothing a "show changes" button wouldn't be able to handle :) If you ever get a chance to test the script in IE, I'd most certainly appreciate it, but otherwise it's no big deal.
- By the way, I see that you have not yet fixed the dash problem inside the image tags. If you get a chance to work on those, please also exclude the interwikies (I've just applied the scipt to the Moscow page, and it tried to fix a dash inside the gl: interwiki link). Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:24, 4 December 2007 (UTC)
- Here are more ideas (rather simple to implement, I hope):
- delink decades (1960s would become 1960s);
- replace html codes with values ("&mdash ;" would become "—").
- Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:32, 5 December 2007 (UTC)
- Here is a bug report—nothing major, but if you could fix it, it'd help. When replacing HTML entities, Advisor (correctly) ignores non-breaking spaces in IE, but for some reason tries to replace them with regular spaces in Opera. Also, when clicking on the problem description in Opera, Advisor sometimes highlights whole paragraphs instead of just the entity that needs to be fixed. Clicking on the problem description again highlights the entity properly. Finally, clicking the ellipses in the suggestions line expand the list of suggestions, but the list shrinks back again after any one issue is fixed. Would these be easy to fix? Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 19:12, 20 December 2007 (UTC)
- Hi there! Just wanted to let you know that if you added Advisor to one of the lists here, it would expose it to more editors, and it may start being used by more people. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 17:34, 8 January 2008 (UTC)
- Thanks, and glad you are back! I'll be looking forward to further improvements of the script.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 22:15, 14 January 2008 (UTC)
- Hi there! Just wanted to let you know that if you added Advisor to one of the lists here, it would expose it to more editors, and it may start being used by more people. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 17:34, 8 January 2008 (UTC)
- Here is a bug report—nothing major, but if you could fix it, it'd help. When replacing HTML entities, Advisor (correctly) ignores non-breaking spaces in IE, but for some reason tries to replace them with regular spaces in Opera. Also, when clicking on the problem description in Opera, Advisor sometimes highlights whole paragraphs instead of just the entity that needs to be fixed. Clicking on the problem description again highlights the entity properly. Finally, clicking the ellipses in the suggestions line expand the list of suggestions, but the list shrinks back again after any one issue is fixed. Would these be easy to fix? Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 19:12, 20 December 2007 (UTC)
- Here are more ideas (rather simple to implement, I hope):
- Regarding this, I'd say the second space should not be a non-breaking one. It is a problem when an mdash is wrapped to start a new line, but there really is no problem when that happens to the word following the mdash. But, thanks for the upgrade all the same! Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:06, 3 December 2007 (UTC)
Opera
Thanks for putting so much effort into this! The changes you introduced during the course of past few weeks improved the usability a great deal.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 22:15, 3 February 2008 (UTC)
suggestion for advisor
Could advisor be made to suggest replacing three periods (...) with an ellipsis (…)? Jay32183 (talk) 04:45, 16 March 2008 (UTC)
- Done. :) --Cameltrader (talk) 20:09, 22 March 2008 (UTC)
- Sorry, I will have to change the direction of the conversion. WP:MOS recommends the three periods. --Cameltrader (talk) 17:05, 28 March 2008 (UTC)
Advisor questions
Thanks I really appreciate the script; it's useful for a variety of house-cleaning activities. I would like to ask you why it inserts the HTML non-breaking space though; what is the point, exactly? Also, if dates are in the ISO form (e.g. [[2008]]-[[03]]-[[18]]), the script thinks that the "[[2008]]" portion is a linked year rather than part of a date. If you respond, please make it on my talk. Keep up the good work! -Justin (koavf)·T·C·M 01:33, 19 March 2008 (UTC)
- Thanks again First off, as you note below, Advisor contradicts itself by inserting an HTML object and fixing HTML objects; this is a little troubling philosophically, I suppose. Also, I don't really see why it is critical to make sure the dashes don't wrap in the unlikely event that they do occur at the edge of the browser. I guess that could be important for code, but surely that would be written between <nowiki> or <tt> tags, right? Again, I don't mean to sound combative; I'm honestly ignorant. -Justin (koavf)❤T☮C☺M☯ 18:23, 19 March 2008 (UTC)
- Justin, an event when ndash is wrapped is not all that unlikely. What's more, if you consider a great variety of browsers/screen resolutions/window sizes, you'll see that no matter where ndash is located, some combination of these three factors will produce a situation when ndash occurs at the beginning of a new line. Note, for example, that WP:MOSNUM actively encourages using a non-breaking space between the number and the unit; ndashes/mdashes a preceded with non-breaking spaces for all the same reasons. Nowiki and tt tags are of no use for this. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:43, 19 March 2008 (UTC)
- Sure That makes sense; I'm still not clear on why this is a problem, though. -Justin (koavf)❤T☮C☺M☯ 06:42, 20 March 2008 (UTC)
- We could expose this to a broader discussion and ask to include a sentence about it in the MOS. It is not clear currently whether nbsp-before-dash is generally preferred, avoided, or it's a tie (like, say, the serial comma). My personal opinion is slightly biased towards inclusion of the nbsp, because I think the beauty of not having a leading dash on the next line outweighs the ugliness of having escape characters in the wikitext.
- For the time being I'll leave the "nbsp-dash" suggestion as is. --Cameltrader (talk) 08:01, 20 March 2008 (UTC)
- Sure That makes sense; I'm still not clear on why this is a problem, though. -Justin (koavf)❤T☮C☺M☯ 06:42, 20 March 2008 (UTC)
- Justin, an event when ndash is wrapped is not all that unlikely. What's more, if you consider a great variety of browsers/screen resolutions/window sizes, you'll see that no matter where ndash is located, some combination of these three factors will produce a situation when ndash occurs at the beginning of a new line. Note, for example, that WP:MOSNUM actively encourages using a non-breaking space between the number and the unit; ndashes/mdashes a preceded with non-breaking spaces for all the same reasons. Nowiki and tt tags are of no use for this. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:43, 19 March 2008 (UTC)
Small bug
Hi there! When Advisor replaces ndashes with a non-breaking space-ndash combination, it inserts ndash as an HTML entity (which it immediately offers to fix). Could you, please, make it insert the ndash properly right away? Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:56, 19 March 2008 (UTC)
- It is supposed to preserve whatever dash you already have there and insert a nbsp before it. The editor has to be aware that two changes are happening and should understand both. --Cameltrader (talk) 08:09, 20 March 2008 (UTC)
- You were not saying that the script replaces a Unicode ndash character with an HTML escape, were you? --Cameltrader (talk) 08:11, 20 March 2008 (UTC)
- Now that you've put it that way, I forgot what exactly the problem was. But no, the script does not replace a Unicode ndash with an HTML escape. I'll let you know as soon as I replicate the problem. Best,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:05, 20 March 2008 (UTC)
- Now I got what caused the confusion… The "mdash" rule, which I somehow missed to document, replaces both the dash and the space before it. It should like "nbsp-dash" in the future, for the reasons described above. --Cameltrader (talk) 18:12, 24 March 2008 (UTC)
- Ah! I knew I wasn't delirious! :)—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:22, 24 March 2008 (UTC)
- Now I got what caused the confusion… The "mdash" rule, which I somehow missed to document, replaces both the dash and the space before it. It should like "nbsp-dash" in the future, for the reasons described above. --Cameltrader (talk) 18:12, 24 March 2008 (UTC)
- Now that you've put it that way, I forgot what exactly the problem was. But no, the script does not replace a Unicode ndash with an HTML escape. I'll let you know as soon as I replicate the problem. Best,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:05, 20 March 2008 (UTC)
Highlight error when used w/ wikEd
I've noticed that when Advisor is used with wikEd in Firefox 2.0, WikEd's syntax highlighting hides Advisor's highlighting. Advisor's highlighting appears when wikEd's syntax highlighting is turned off. Temporaluser (talk) 22:19, 19 March 2008 (UTC)
- AFAIK, wikEd uses an IFRAME to render the edited text as DOM elements (because of the syntax highlighting) and tries to make that look like the TEXTAREA we are all familiar with. Advisor.js only selects text in the TEXTAREA, so they end up being incompatible… I thought about popping up a warning if my script detects wikEd, since this is easy to do. I may integrate with wikEd, but this will require time for me to get familiar with the code, and I will probably need cooperation from Cacycle, who anyway looks quite busy supporting his editor. It is possible to do this in the near future, however. --Cameltrader (talk) 09:42, 20 March 2008 (UTC)
Tags added with Advisor?
Tricky suggestion Is it possible to do the following with Advisor?
- Add {{Sections}} to articles that have no headings?
- Add {{subst:Trivia-now}} below any sections labeled "Trivia" or "Miscellany"?
- Add {{Nofootnotes}} to any article that lacks a <ref> tag?
- Add {{subst:dated|uncategorized}} to any article that does not have a category or template transcluded into it (as so many templates add articles to categories?)
- Add {{Deadend}} to articles that have less than three (for instance) links?
- Add {{ExcessiveLinks}} or {{Too many links}}to articles that have more than 20 (again, an arbitrary number) links outside of <refs>, or to more than 20 links under a "External links" heading?
- Add Too many categories {{Too many categories}} to articles that have more than 20 (arbitrary) categories?
I can't think of any times when these would be undesirable except for when the article already has these tags. Does that make sense to you? Does it seem feasible? I'd prefer if you responded on my talk, but I'll try to remember to check this if you don't respond soon. Thanks. -Justin (koavf)❤T☮C☺M☯ 07:05, 20 March 2008 (UTC)
- These sound quite reasonable to me. An additional constraint could be that some checks be skipped if the page is a "stub", for instance #3 and #5. I've never used most of these templates, so I'll need to research them—how they are used, what opinions people have about them. Thanks for the ideas --Cameltrader (talk) 10:10, 20 March 2008 (UTC)
- Hello all! I came here to learn about Advisor, after I noticed some reasonable changes to JavaScript. I'd suggest that drive-by or cleanup editors not insert tags automatically using a tool. I can foresee negative feedback from the maintainers of those articles! (It might be OK if a tool run by the maintainer himself draws attention to whichever problems are worthy of tagging). There might be an exception for new articles or those that are obviously under contruction. EdJohnston (talk) 14:22, 20 March 2008 (UTC)
- Agreed, with a correction—the tool does not do any automated changes. The person who uses the tool decides explicitly whether to accept each proposed change, so the decision about tagging always remains a human decision. Our responsibility is not to tempt editors to do that in vain: we have to provide conservative defaults for the limits, for example of what "too many links" means. Generally, I see value in the idea. --Cameltrader (talk)
- I do too. It is always up to the user in question. And these would make things a lot easier. Maximillion Pegasus (talk) 00:23, 21 March 2008 (UTC)
- Agreed, with a correction—the tool does not do any automated changes. The person who uses the tool decides explicitly whether to accept each proposed change, so the decision about tagging always remains a human decision. Our responsibility is not to tempt editors to do that in vain: we have to provide conservative defaults for the limits, for example of what "too many links" means. Generally, I see value in the idea. --Cameltrader (talk)
- Hello all! I came here to learn about Advisor, after I noticed some reasonable changes to JavaScript. I'd suggest that drive-by or cleanup editors not insert tags automatically using a tool. I can foresee negative feedback from the maintainers of those articles! (It might be OK if a tool run by the maintainer himself draws attention to whichever problems are worthy of tagging). There might be an exception for new articles or those that are obviously under contruction. EdJohnston (talk) 14:22, 20 March 2008 (UTC)
Browser/platform recognition
Would it be terribly difficult to add some user-adjustable settings that would allow for not loading Advisor in certain browsers/platforms? I, for example, would much prefer not to have Advisor loaded when I'm logged in from my PocketPC, because it occasionally slows Mobile Opera quite a bit (the thing isn't lightning fast as it is). It's not something I can't handle, but if it could be implemented fairly easily, that'd be just swell. Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 00:47, 21 March 2008 (UTC)
- What I can do fairly easily is add a "Turn Off" button that sets a cookie. When Advisor.js loads, it can check the cookie before doing any wikitext analysis. I'd prefer to do this rather than browser detection. Do you think it would be ok?
- I wish I didn't have to implement such a button, by the way. The issue of easy on/off switching is shared among all user scripts. There have been efforts to provide a common GUI for this—User-script manager (now part of WP:Gadgets)—but it used AJAX-based actual edits of a wiki page instead of cookies. I made an attempt to solve this too, but abanadoned it. I hope someone will find an elegant solution for all shared user scripts, if WP:Gadgets (I haven't checked it recently) is not already doing that. --Cameltrader (talk) 08:51, 21 March 2008 (UTC)
- Like I said, if it's too much trouble to implement, don't worry about it. As for the On/Off button, that'd work for me just fine. Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 13:41, 21 March 2008 (UTC)
- Anyway, I thought I'd do it the easy way, since I doubt this particular feature is going to be in much demand. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 01:51, 1 April 2008 (UTC)
- Excellent solution :) Btw, I tried to save effort from the "toggle" button (and gain some popularity and cleaner design) by proposing Advisor.js as a gadget, but I don't know how long it will take... --Cameltrader (talk) 07:06, 1 April 2008 (UTC)
- Anyway, I thought I'd do it the easy way, since I doubt this particular feature is going to be in much demand. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 01:51, 1 April 2008 (UTC)
- Like I said, if it's too much trouble to implement, don't worry about it. As for the On/Off button, that'd work for me just fine. Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 13:41, 21 March 2008 (UTC)
Centuries & decades
Here's an easy one to implement—centuries should not be wikilinked (i.e., 17th century becomes 17th century). Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:50, 24 March 2008 (UTC)
- Also, incorrectly formatted decades could be fixed (e.g., 1990's should become 1990s).—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:04, 24 March 2008 (UTC)
- Sure, I'll put them on my queue. --Cameltrader (talk) 17:59, 24 March 2008 (UTC)
Something to consider
You should make advisor change {{DEFAULTSORT|article}} to since it's better to use the magic word than the template. --EoL talk 00:03, 28 March 2008 (UTC)
- I'll add it, thanks. --Cameltrader (talk) 08:21, 28 March 2008 (UTC)
This script
I copyedit a lot of articles, and someone told me about this script earlier today. I think it's great. :) jj137 (talk) 02:27, 30 March 2008 (UTC)
- Thanks. If you find anything wrong with it or have ideas for improvement, you can share them here :) --Cameltrader (talk) 05:00, 30 March 2008 (UTC)
Opera scrollTop
I was thinking on possible workarounds ... First, you could make textarea long enough to get rid of vertical scroll bar. Second, you could do the same but then enclose it inside scrollable div, see the code below; unfortunately, I don't see a way to reliably duplicate horizontal scrolling. Maybe this is worth implementing as a a user configurable parameter? Anyhow, I think you should warn Opera users on the script description page, something along the lines with "if you use Opera and you do not see highlighted text in textarea, press → arrow and then the text cursor will be right after the text that the script suggested to fix; you can press on suggestion link again to highlight it". —AlexSm 16:45, 1 April 2008 (UTC)
//put textarea into scrollable div
var dd = document.createElement('div')
textbox1.parentNode.insertBefore(dd,textbox1)
dd.appendChild(textbox1)
dd.style.height = textbox1.clientHeight + 'px'
textbox1.style.height = textbox1.scrollHeight + 'px'
textbox1.style.overflowY = 'hidden'
dd.style.overflowY = 'auto'
textbox1.style.borderTop = 'none'
dd.style.borderTop = '2px inset #eee'
- This is a smart workround, I'll try it. --Cameltrader (talk) 09:10, 11 April 2008 (UTC)
Some issues
- Advisor is constantly suggesting whitespace fix while I'm typing. I know checking cursor position is tricky, but I think it's something to consider. —AlexSm 16:45, 1 April 2008 (UTC)
- Yes, it's annoying. I'd prefer to avoid the cursor position check if possible, this would be hard to implement and probably unreliable. I was thinking about adding an optional "rescanDelay" property to the Suggestion objects (just a vague idea), this would also be useful for ones which are expensive to compute. --Cameltrader (talk) 11:20, 11 April 2008 (UTC)
- "Add to summary" option should not appear on §ion=new. —AlexSm 16:45, 1 April 2008 (UTC)
- Not a big deal, IMO. I'll do as you propose anyway. --Cameltrader (talk) 11:20, 11 April 2008 (UTC)
- Done. --Cameltrader (talk) 09:26, 13 April 2008 (UTC)
- Not a big deal, IMO. I'll do as you propose anyway. --Cameltrader (talk) 11:20, 11 April 2008 (UTC)
- You're welcome to join some scripts developers at irc://irc.freenode.org/#mediawiki-scripts :) —AlexSm 16:45, 1 April 2008 (UTC)
- Thanks :) --Cameltrader (talk) 11:20, 11 April 2008 (UTC)
- Here's another (minor?) thing: it might be a good idea to disable (at least initially) Advisor on talk pages (and maybe Wikipedia namespace pages as well), to avoid suggestions to fix other users messages and signatures, which is not a good thing to do. —AlexSm 14:30, 11 April 2008 (UTC)
- Done for talk pages. --Cameltrader (talk) 09:26, 13 April 2008 (UTC)
- Can this be made an option, though? While Advisor should definitely not mess with others' comments, I find its help invaluable when I preview my own comments, at which time I have a chance to correct all those dashes and accents of my own. For me, entering "&ndash ;", for example, and then having Advisor replace it is usually much simpler than entering the actual ndash.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:20, 14 April 2008 (UTC)
- You can still use it, it's only a warning and there's a link letting you "scan the text anyway"; could be a bit inconvenient to click each time, so maybe it's time I added my first option. Until now, I've been relying on good defaults. --Cameltrader (talk) 16:33, 14 April 2008 (UTC)
- Thanks; I was too lazy to actually check how exactly the new version would be working on talk pages :) A "scan anyway" workaround will work just fine for me.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:42, 14 April 2008 (UTC)
- You can still use it, it's only a warning and there's a link letting you "scan the text anyway"; could be a bit inconvenient to click each time, so maybe it's time I added my first option. Until now, I've been relying on good defaults. --Cameltrader (talk) 16:33, 14 April 2008 (UTC)
- Can this be made an option, though? While Advisor should definitely not mess with others' comments, I find its help invaluable when I preview my own comments, at which time I have a chance to correct all those dashes and accents of my own. For me, entering "&ndash ;", for example, and then having Advisor replace it is usually much simpler than entering the actual ndash.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:20, 14 April 2008 (UTC)
- Done for talk pages. --Cameltrader (talk) 09:26, 13 April 2008 (UTC)
Free Wikipedia logo
Could you link me to the 'free Wikipedia logo' that you are using in the screenshot? Gary King (talk) 02:15, 11 April 2008 (UTC)
- I painted it myself as a placeholder. I am not violating anything with this, am I? --Cameltrader (talk) 11:31, 11 April 2008 (UTC)
- Nope, it's not in violation of anything, but it would certainly be useful for other images, I'm sure. Also, I may have a few uses for it; would you mind sharing it under a public domain license or a Creative Commons license? Gary King (talk) 15:46, 2 June 2008 (UTC)
- I updated the description on Commons, the logo is in the public domain now. Use it however you may wish, just be aware that I've somewhat messed up the characters on the globe puzzle: the lower left one should be some (Chinese?) hieroglyph and the Hebrew letter on the original logo is actually a Resh (round corner) not a Daleth (sharp corner). --Cameltrader (talk) 20:58, 2 June 2008 (UTC)
IE6 textarea scrolling
When you click on a suggestion in IE6, for a quick moment you can see selected text (because IE automatically scrolls textarea down to selected text) and then the script incorrectly scrolls textarea up, to some position near the top. I think I tracked it down to this: IE6 needs some time to populate the hidden textarea with your text, and you're asking it for scrollHeight too early. If you try to duplicate this, note that maybe this only happens on relatively slow computers. Moving the line var yOffset = hta.scrollHeight;
a bit down, just before you actually need this variable, seems to fix this. —AlexSm 14:30, 11 April 2008 (UTC)
- Unfortunately, moving the yOffset down doesn't help much. I tried editing today's featured article with IE6/Wine on a reasonably fast box (3GHz Intel CPU, 2G RAM). --Cameltrader (talk) 15:03, 11 April 2008 (UTC)
- This could be the answer, the Explorer way:
javascript: document.selection.createRange().scrollIntoView();
It doesn't place the selected text in the middle of the textarea, but it's good enough. --Cameltrader (talk) 16:30, 11 April 2008 (UTC)- Would you be able to fix this bug relatively soon? I've been meaning to report it for quite a while now, but couldn't quite phrase what the problem was (Alex, thanks for exactly pinpointing it). A workaround I found was to sequentially press arrowup/arrow down, which brings the (no longer) highlighted area into view, but I must admit it's been pretty annoying :) Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:51, 11 April 2008 (UTC)
- I think I fixed it. There is no need to use
scrollIntoView()
, actually, Explorer does that automatically—it scrolls as much as needed to put the selected text either at the top or at the bottom of the visible area. I wonder if it's worth trying to make the selected text appear in the middle. What do you think? --Cameltrader (talk) 06:09, 13 April 2008 (UTC)
- I think I fixed it. There is no need to use
- Would you be able to fix this bug relatively soon? I've been meaning to report it for quite a while now, but couldn't quite phrase what the problem was (Alex, thanks for exactly pinpointing it). A workaround I found was to sequentially press arrowup/arrow down, which brings the (no longer) highlighted area into view, but I must admit it's been pretty annoying :) Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:51, 11 April 2008 (UTC)
- This could be the answer, the Explorer way:
Minor decades bug
On this diff, Advisor correctly suggests to replace 1940's with 1940s, but for some reason does not detect 1950's on the same line.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 19:34, 16 May 2008 (UTC)
- It only matches years preceded by the. Otherwise a false positive may be produced for the genitive case, as in something like "...1949's blockade lift and 1950's riots..." --Cameltrader (talk) 21:26, 2 June 2008 (UTC)
One-click fix?
Would it be possible to have a one-click fix for Advisor.js, so I just click a button to fix the issues it brings up? Also, it would be nice if it would also automatically submit the 'Changes' button so we can see what changes it has made. This is typically what I do, anyways; I just click 'fix' for all the items then click 'Changes' to see what it has changed, and if anything major changed that I do not like, then I change it back manually. This works nicely for other scripts, such as the punctuation script, which fixes punctuation automagically in articles and then shows you what has changed. Gary King (talk) 15:48, 2 June 2008 (UTC)
- As an admirer of the Python programming language, I've always tried to follow one of its "zen" principles: explicit is better than implicit. Generally, I don't like things to happen by magic, so I let the user be constantly aware of her actions. But what you are saying reminds me of another great aphorism: it is easier to ask for forgiveness than for permission, which the trick with the diff fits into :)
- I am "busy in real life" this month and I may not have a chance to improve my script, so here is a quick hack you can use—bookmark it as a link:
javascript: while (ct.suggestions.length > 0) { ct.fixSuggestion(0); }; document.getElementById('wpDiff').click();
- and click the bookmark to fix all and view the changes. --Cameltrader (talk) 22:06, 2 June 2008 (UTC)
Undo
I suspect it is going to be a pain in the butt to fix, but in case it is not, would it be possible to retain Ctrl-Z functionality of the text area after one or several fixes are done with Advisor? Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 14:16, 4 June 2008 (UTC)
- Sounds too hard for me, and if the workaround is more than a couple of lines this goes well out of the tool's scope, sorry :( I'll be looking around for possible short fixes. Firefox, btw, manages ctrl-Z pretty well. --Cameltrader (talk) 09:16, 14 July 2008 (UTC)
Two bugs and a request
Thanks again The script works like a dream, but there are two minor issues:
- When formatting some dates, I believe of this type - [[June 28]],[[2006]] - the script will make [[June 28]],undefined[[2006]] instead of [[June 28]], [[2006]]
- When the script encounters an ISO-style date (e.g. [[2008]]-[[06]]-[[21]]), it thinks that [[2008]] is a year link. For awhile this one was fixed, as I recall. Somehow, it has reared its ugly head again.
And the request: Can you make it so that the script recognizes unnecessary instances of the word template? E.g. {{Template:Counting Crows}} instead of the proper {{Counting Crows}}. I will watch this page for a few days for a response. Thanks. -Justin (koavf)❤T☮C☺M☯ 08:59, 9 June 2008 (UTC)
- Screenshot As you can see, I have found an instance of the "undefined" bug. It changes [[June 2]],[[2008]] to [[June 2]]undefined2008. —Justin (koavf)❤T☮C☺M☯ 07:06, 12 June 2008 (UTC)
- And again How about a suggestion for inserting {{DEFAULTSORT}} into articles starting with "a" and "the" but have no sorting? —Justin (koavf)❤T☮C☺M☯ 04:47, 17 June 2008 (UTC)
Hi Justin, here are my replies:
- "undefined" when fixing the date format: my mistake, should be fixed now. Btw, do you think the script should fix the whitespace in such cases, I mean "[[June 28]],[[2006]]" to "[[June 28]], [[2006]]"? The current behaviour is to preserve the whitespace in between as is.
- ISO dates: after a brief test, I learned that MediaWiki (or the respective plugin) does not recognise [[yyyy]]-[[mm]]-[[dd]] as a date which should be formatted according to the user prefs. The expected ISO format is only [[yyyy]]-[[mm-dd]]. So, IMO it is correct to recognise yyyy as a year link in this case.
- {{DEFAULTSORT}} for articles starting with "the": good idea. I'm not so sure about "a", I gotta take a look at how many titles start with "a" as the indefinite article and how many use the letter "a" as something else. I put this in on my agenda.
--Cameltrader (talk) 10:58, 14 July 2008 (UTC)
- Thanks I definitely think the whitespace should be fixed (although without literally inserting , but rather a space itself.
- I suppose I've been writing ISO dates incorrectly! Is there a way that this can be added to the script? That is, can it fix "yyyy-mm-dd" to "yyyy-mm-dd?"
- If you think there are too many "A ..." articles, don't worry about it, but "The ..." is handy (and possibly "An ...") The good news is that the script isn't automated, so even if there are a significant amount of "A ..." articles that shouldn't be sorted, we can still be judicious about that. —Justin (koavf)❤T☮C☺M☯ 19:42, 14 July 2008 (UTC)
Another bug?
Not very important, as I don't particularly use this feature, but it seems that Advisor does not always offer to fix inconsistent headers (e.g., when two of the headers do not have spaced equal signs and three or four do, Advisor is silent). Or is it by design, because it is hard to determine the intended prevalence of one formatting over another when usage deltas are low?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:25, 17 June 2008 (UTC)
- The minority is considered fixable only if it is less than 30%. It was a bad idea, I'll change it to what you would normally expect (50%). --Cameltrader (talk) 11:06, 25 June 2008 (UTC)
- Thanks, that makes the feature much more useful. For the 50/50 cases, however, can Advisor show a notice (without a fix button) that the headers in the text are inconsistent (much like it does for duplicate headers now)? That would prompt editors that there is a problem with the headers which they may not otherwise notice, and the decision of how (or if) to fix those headers would be up to the editors.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:12, 26 June 2008 (UTC)
An excuse
I guess I owe one to the users of this script. I've been offline this month (doing my graduation work) without taking the time to make it clear on my user page. Ëzhiki, Koavf, next week I'll look into the issues you've reported, thanks for your help. --Cameltrader (talk) 16:13, 19 June 2008 (UTC)
Request similar to [[A|A]]
Please Can you fix [[Example|Example's]] to [[Example]]'s and [[Examples|Examples']] to [[Examples]]'? —Justin (koavf)❤T☮C☺M☯ 20:40, 16 July 2008 (UTC)
- Those are different things, see how they get rendered: Example's vs Example's and Examples' vs Examples'. The suffix would change from blue (part of the link) to black (normal text). Are you sure this is what you want? --Cameltrader (talk) 16:34, 17 July 2008 (UTC)
- Not quite No, not really - I guess it's not that important anyway. —Justin (koavf)❤T☮C☺M☯ 02:29, 19 July 2008 (UTC)
DEFAULTSORT
Thanks I just used it and it worked like a dream - but is it preferable to have "X, the" or "X, The?" I have always used the latter and, unfortunately, "t" and "T" are sorted differently with Mediawiki software. Maybe it's immaterial; I don't know. —Justin (koavf)❤T☮C☺M☯ 21:33, 25 July 2008 (UTC)
- You're right. I don't know why I did it that way. Fixed. --Cameltrader (talk) 22:12, 25 July 2008 (UTC)
Ellipsis?
This script seems very useful, but I'm wondering what the rationale is behind replacing a proper Unicode ellipsis with three periods? If anything, it should work the opposite way. Adam McMaster (talk) 14:15, 11 August 2008 (UTC)
- It used to be the other way, but was changed per MOS guidelines.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:17, 11 August 2008 (UTC)
Request
Headings You may want to implement something in the script that converts h1 headings to h2 headings, since the former are not to be used according to WP:MOS. E.g. convert =Title= to ==Title==. —Justin (koavf)❤T☮C☺M☯ 04:47, 19 August 2008 (UTC)
- Good idea. --Cameltrader (talk) 12:45, 28 September 2008 (UTC)
Another Request
Convert [[image:
to [[Image:
It also would be great if it ignored fixes to be done within [[Image:...]] Thanks, LegoKontribsTalkM 23:38, 6 September 2008 (UTC)
- I like this, it could even be a more general rule, to change any
[[namespace:
to[[Namespace:
. Can you think of a good reason I can use to justify the conversion? - Some fixes are ignored when found between
[[Image:
and]]
, but not all of them... --Cameltrader (talk) 13:12, 28 September 2008 (UTC)
Minor script problem concerning
and m-dash
I just noticed from another user's recent edits to Harry Potter that this script, when used to convert " —" (space m-dash) into "
—", is occasionally placing multiple
es next to each other when the text contains a space between an already-existing
and an m-dash (that is,
, space, m-dash). I don't know if this is preventable, but I thought I'd let you know. Mr. Absurd (talk) 20:23, 11 September 2008 (UTC)
- You're right, the second nbsp is redundant. But why was there a space next to the nbsp initially? I hope my script didn't produce that. I'll just be lazy and leave that for the user to fix manually, as this is an (I assume) uncommon error, easy to fix, and there might be cases where it makes sense to have two adjacent nbsp-s... If you come across another case like this, please, let me know again. --Cameltrader (talk) 13:27, 28 September 2008 (UTC)
I just wanted to note a similar issue here. Do U(knome)? yes...or no 05:49, 2 January 2009 (UTC)
- I don't understand why non-breaking spaces are put before and after em dashes anyway, as only unspaced em dashes should be used on Wikipedia anyway. Dabomb87 (talk) 15:58, 2 January 2009 (UTC)
delinking dates
Since autoformatting dates is now deprecated, would it be possible to have Advisor.js remove links around dates? Adam McMaster (talk) 14:02, 28 September 2008 (UTC)
Suggestions within <gallery> tags
I was just editing Robie House when I noticed that Advisor.js suggested replacing the space-hyphen-space within several image links that were part of a gallery—if it's possible, I think you should edit the script to not suggest some changes within <gallery> and </gallery> tags.
I realize it might not happen that often, but in this case, where there are 8 suggestions like this in a row, it means I can't easily access the suggestions that come afterwards. Mr. Absurd (talk) 06:12, 8 December 2008 (UTC)
This can break LaTeX maths
I noticed on Quadrature amplitude modulation, someone used advisor.js to make this edit. The portion at line 71 broke the display of the maths. Anything inside <math></math> tags should probably never be edited in this way since the LaTeX parser cannot handle HTML or Unicode entities and the like. Splash - tk 14:28, 9 January 2009 (UTC)
Removing a word
When advisor come to the sentence: "The company was sold in 1958 and subsequently moved to Cheektowaga, New York and the factory was completely shut down by the 1960's." it correctly removed the apostophe in 1960's, but also removed the word "the". Is that a chnage that is coded to happen on purpose? Thanks, §hepTalk 23:30, 6 March 2009 (UTC)
Add function to change image to file
Is it possible to add a function that would change "Image:blah.jpg" to "File:blah.jpg"? Dabomb87 (talk) 12:45, 10 March 2009 (UTC)
- Why would you want to do that? WP:Images doesn't seem to suggest that either way is preferable. Adam McMaster (talk) 16:08, 10 March 2009 (UTC)
- Consistency between articles would be nice; for new editors, seeing "File" and then "Image" might confuse some. Anyway, not a big deal. Dabomb87 (talk) 22:43, 10 March 2009 (UTC)
Two bugs and four requests
Hello, and thanks for your useful script. I have two bug reports and four requests:
- Bug 1: the all-caps correction should ignore text inside comments, which are often something like "DO NOT DO THIS!!"
- Bug 2: ndash and nbsp rules should not be applied to image names in infoboxes
- Request 1: replace "YEAR–present" and "YEAR – present" with "since YEAR" (as per WP:DATE)
- Request 2: add mandatory blank line above all headings (as per WP:HEAD)
- Request 3: fix inconsistent spacing in bulleted lists: from "* Item" to "*Item" or vice-versa (based on majority of instances)
- Request 4: fix inconsistent blank lines between headings and text (based on majority of instances):
- ==Heading 2==
- Blank line
- Text text text text text text
Mushroom (Talk) 19:07, 11 March 2009 (UTC)
- I was going to say the same thing Oldag07 (talk) 05:07, 26 July 2009 (UTC)
Image problem
Sorry if this has been brought up already, but I was wondering if there is there any way, that when editing a page, the script could leave images and separate articles alone (even if they contain hyphens)? It has created red links in a few cases. Thank you. MTLskyline (talk) 04:27, 5 April 2009 (UTC)
- I'd have to second that. I've gotten in trouble twice for this. Perhaps have it leave alone any information within an external link, wikilink, reference, image gallery, or regular image link that might contain an improper dash. --Kraftlos (Talk | Contrib) 20:37, 8 June 2009 (UTC)
heading-nesting warning on /doc pages
Advisor.js suggests a heading-nesting fix when the first heading on a page isn't a level 2 heading. However, the preload for {{documentation}} starts with level 3, as discussed at template talk:documentation/Archive 2#Heading fix. Could this suggestion be disabled on /doc pages? Chris Cunningham (not at work) - talk 17:50, 18 July 2009 (UTC)
Incorrect mdashes
Pages which have been processed by Advisor.js seem to end up with mdashes with leading and trailing spaces—this is contrary to WP:EMDASH: "Em dashes should not be spaced". I'm not certain if this is due to the script; apologies if it's not the culprit. Pol098 (talk) 16:32, 1 August 2009 (UTC)
- Advisor.js suggests mdashes instead of spaced hyphens; based on WP:DASH, I agree it should suggest spaced ndashes instead. —ADavidB 01:50, 24 August 2009 (UTC)
Doesn't work with Beta WP
Advisor.js seems incompatible with WP's new "Beta" format. I see no 'OK' message and no edit suggestions – nothing. Popups, another script I use, didn't use to work with Beta WP, but has since started working, so I expect it's possible to make Advisor compatible also. —ADavidB 01:42, 24 August 2009 (UTC)
- "Never mind." I found that the vector.js page needs to be used with the Beta interface, and not monobook.js. Why popups operation changed beforehand, I don't know. —ADavidB 02:43, 24 August 2009 (UTC)
Control characters
Could Advisor also be made to detect Unicode control characters? They apparently can cause some problems in articles. 「ダイノガイ千?!」? · Talk⇒Dinoguy1000 21:34, 23 October 2009 (UTC)
Google Chrome on Beta
Advisor seems to only work sporadically on Google Chrome when using the beta Vector skin. Most of the time I don't get any Advisor suggestions or messages (not even "ok"), but rarely and randomly (at least, I haven't found a pattern to it yet), I'll get the bar and Advisor will operate completely normally. Note that I don't get any JS errors, even when Advisor isn't working. 「ダイノガイ千?!」? · Talk⇒Dinoguy1000 21:36, 23 October 2009 (UTC)
author=SSNGetName();
Please fix this
http://en.wikipedia.org/w/index.php?title=The_Onion&diff=prev&oldid=323889991
author=SSNGetName(); | —Preceding unsigned comment added by Smremde (talk • contribs) 14:45, 4 November 2009 (UTC)
- Looks like a problem with Reflinks not Advisor. Let me have a look. RP9 (talk) 19:16, 4 November 2009 (UTC)