User talk:Cameltrader/Advisor.js/Description
From Wikipedia, the free encyclopedia
[edit] 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)
- 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)
-
-
- 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)
-
[edit] 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:
[edit] 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)
[edit] 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)
[edit] 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)
[edit] 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)