User talk:Ebrahames/Advisor: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Ebrahames (talk | contribs)
→‎Request: good idea
Ebrahames (talk | contribs)
Line 236: Line 236:
It also would be great if it ignored fixes to be done within <nowiki>[[Image:...]]</nowiki>
It also would be great if it ignored fixes to be done within <nowiki>[[Image:...]]</nowiki>
Thanks, <span style="border:1px solid white;background-color: yellow; color: blue">[[User:Legoktm|Lego]][[Special:Contributions/Legoktm|K<sup>ontribs</sup>]][[user talk:Legoktm|T<sup>alk</sup>]][[Special:Random|M]]</span> 23:38, 6 September 2008 (UTC)
Thanks, <span style="border:1px solid white;background-color: yellow; color: blue">[[User:Legoktm|Lego]][[Special:Contributions/Legoktm|K<sup>ontribs</sup>]][[user talk:Legoktm|T<sup>alk</sup>]][[Special:Random|M]]</span> 23:38, 6 September 2008 (UTC)

:I like this, it could even be a more general rule, to change any <code><nowiki>[[namespace:</nowiki></code> to <code><nowiki>[[Namespace:</nowiki></code>. Can you think of a good reason I can use to justify the conversion?
:Some fixes ''are'' ignored when found between <code><nowiki>[[Image:</nowiki></code> and <code><nowiki>]]</nowiki></code>, but not all of them... --[[User:Cameltrader|Cameltrader]] ([[User talk:Cameltrader|talk]]) 13:12, 28 September 2008 (UTC)


== Minor script problem concerning <code>&amp;nbsp;</code> and m-dash ==
== Minor script problem concerning <code>&amp;nbsp;</code> and m-dash ==

Revision as of 13:12, 28 September 2008

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! TodorBozhinov 13:21, 18 September 2006 (UTC)[reply]

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:
   {{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)[reply]
Wow, I just checked the script out, it works perfectly and does a tremendous job! Big thanks for creating it! TodorBozhinov 20:18, 18 September 2006 (UTC)[reply]
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)[reply]
I'm using Firefox and Win XP. As far as I can tell everything's working great. TodorBozhinov 13:14, 19 September 2006 (UTC)[reply]

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)[reply]

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)[reply]

Thanks for considering my request! What I meant by "converting Unicode entities" is to change escapes to the actual characters (so "&#769 ;" 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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]
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)[reply]

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)[reply]

suggestion for advisor

Could advisor be made to suggest replacing three periods (...) with an ellipsis (…)? Jay32183 (talk) 04:45, 16 March 2008 (UTC)[reply]

Done. :) --Cameltrader (talk) 20:09, 22 March 2008 (UTC)[reply]
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)[reply]

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)[reply]

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)TCM☯ 18:23, 19 March 2008 (UTC)[reply]
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)[reply]
Sure That makes sense; I'm still not clear on why this is a problem, though. -Justin (koavf)TCM☯ 06:42, 20 March 2008 (UTC)[reply]
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)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]
Ah! I knew I wasn't delirious! :)—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:22, 24 March 2008 (UTC)[reply]

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)[reply]

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)[reply]

Tags added with Advisor?

Tricky suggestion Is it possible to do the following with Advisor?

  1. Add {{Sections}} to articles that have no headings?
  2. Add {{subst:Trivia-now}} below any sections labeled "Trivia" or "Miscellany"?
  3. Add {{Nofootnotes}} to any article that lacks a <ref> tag?
  4. 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?)
  5. Add {{Deadend}} to articles that have less than three (for instance) links?
  6. 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?
  7. 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)TCM☯ 07:05, 20 March 2008 (UTC)[reply]

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)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]
Sure, I'll put them on my queue. --Cameltrader (talk) 17:59, 24 March 2008 (UTC)[reply]

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)[reply]

I'll add it, thanks. --Cameltrader (talk) 08:21, 28 March 2008 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]

//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)[reply]

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)[reply]
    • 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)[reply]
  • "Add to summary" option should not appear on &section=new. —AlexSm 16:45, 1 April 2008 (UTC)[reply]
  • 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)[reply]
    • Done for talk pages. --Cameltrader (talk) 09:26, 13 April 2008 (UTC)[reply]
      • 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)[reply]
        • 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)[reply]

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)[reply]

I painted it myself as a placeholder. I am not violating anything with this, am I? --Cameltrader (talk) 11:31, 11 April 2008 (UTC)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]

Two bugs and a request

Thanks again The script works like a dream, but there are two minor issues:

  1. 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]]
  2. 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)TCM☯ 08:59, 9 June 2008 (UTC)[reply]

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)TCM☯ 07:06, 12 June 2008 (UTC)[reply]
And again How about a suggestion for inserting {{DEFAULTSORT}} into articles starting with "a" and "the" but have no sorting? —Justin (koavf)TCM☯ 04:47, 17 June 2008 (UTC)[reply]

Hi Justin, here are my replies:

  1. "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.
  2. 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.
  3. {{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)[reply]

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)TCM☯ 19:42, 14 July 2008 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]

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)[reply]

Request similar to [[A|A]]

Please Can you fix [[Example|Example's]] to [[Example]]'s and [[Examples|Examples']] to [[Examples]]'? —Justin (koavf)TCM☯ 20:40, 16 July 2008 (UTC)[reply]

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)[reply]
Not quite No, not really - I guess it's not that important anyway. —Justin (koavf)TCM☯ 02:29, 19 July 2008 (UTC)[reply]

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)TCM☯ 21:33, 25 July 2008 (UTC)[reply]

You're right. I don't know why I did it that way. Fixed. --Cameltrader (talk) 22:12, 25 July 2008 (UTC)[reply]

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)[reply]

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)[reply]

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)TCM☯ 04:47, 19 August 2008 (UTC)[reply]

Good idea. --Cameltrader (talk) 12:45, 28 September 2008 (UTC)[reply]

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)[reply]

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)[reply]

Minor script problem concerning &nbsp; 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 "&nbsp;—", is occasionally placing multiple &nbsp;es next to each other when the text contains a space between an already-existing &nbsp; and an m-dash (that is, &nbsp;, 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)[reply]