User talk:GregU

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Retired
This user is no longer active on Wikipedia.

Welcome[edit]

Hello GregU! Welcome to Wikipedia! Thank you for your contributions. If you decide that you need help, check out Wikipedia:Where to ask a question, ask me on my talk page, or place {{helpme}} on your talk page and someone will show up shortly to answer your questions. Please remember to sign your name on talk pages using four tildes (~~~~); this will automatically produce your name and the date. Finally, please do your best to always fill in the edit summary field. Below are some recommended guidelines to facilitate your involvement. Happy Editing! Patchouli 08:09, 11 September 2006 (UTC)[reply]
Getting Started
Getting your info out there
Getting more Wikipedia rules
Getting Help
Getting along
Getting technical


Glossary of pool, billiards and snooker terms[edit]

Greatly appreciate the copyediting, clarity tweaks and additions! You cannot imagine the number of hours I spent writing this thing and having to rewrite additions. Have a cookie on me.--Fuhghettaboutit 23:40, 14 September 2006 (UTC)[reply]

Thanks! Had fun. Have a few more I think I can add. --GregU 04:05, 15 September 2006 (UTC)[reply]

WikiProject Cue sports[edit]

Thanks for your comments on the draft naming convention. If you are interested, please join the Wikiproject Cue sports (at its temporary location in my userspace), and support its nomination to become an official WikiProject. — SMcCandlish [talk] [contrib] 14:58, 22 November 2006 (UTC)[reply]

Midway Atoll[edit]

I really appreciate all of your edits on US islands, but why did you replace my svg with the original png on Midway Atoll? Thank you. --Indolences 19:21, 14 February 2007 (UTC)[reply]

Sorry, I don't know how that happened. I noticed the double listing for my edit but didn't investigate. All fixed. --GregU 19:41, 14 February 2007 (UTC)[reply]

Blue Rapids intro[edit]

Just wanted to note: the format for the introduction for Blue Rapids is standard, calling it a city and giving the exact population as of the 2000 census. Nyttend 11:58, 7 June 2007 (UTC)[reply]

AfD nomination of Wardrobe malfunction[edit]

An editor has nominated Wardrobe malfunction, an article on which you have worked or that you created, for deletion. We appreciate your contributions, but the nominator doesn't believe that the article satisfies Wikipedia's criteria for inclusion and has explained why in his/her nomination (see also "What Wikipedia is not").

Your opinions on whether the article meets inclusion criteria and what should be done with the article are welcome; please participate in the discussion by adding your comments at Wikipedia:Articles for deletion/Wardrobe malfunction and please be sure to sign your comments with four tildes (~~~~).

You may also edit the article during the discussion to improve it but should not remove the articles for deletion template from the top of the article; such removal will not end the deletion debate. Thank you. BJBot (talk) 07:59, 8 February 2008 (UTC)[reply]

Re: Jaws and "same page" links[edit]

I don't use JAWS 10 – I use JAWS 8 due to pricing concerns. Anyway, the same page links work reasonably well if you wait about two seconds after pressing enter on the link. I don't know what the reason is for the wait. The family tree template works well, except JAWS 8 usually says gibberish like "father child child child child" when I press enter on the link. I don't have time to try it on JAWS 10 now, but I'd expect it'd be the same for the more recent versions of JAWS. Graham87 01:12, 27 December 2008 (UTC)[reply]

Help:Javascript[edit]

Hellow, I need some help for using javascripts in HTML. I am trying to make collapsiple unordered lists. Please see the following unordered list. I want that if I click on "Windows", then 1998, 2000, XP and Vista will be shown; and if I again click on "Windows", then 1998, 2000, XP and Vista will be collapsed. I want to apply this to all components of the list. Please show me the structure. You can contact me to my talk page. --Amit (Talk | Contribs) 11:33, 26 February 2009 (UTC)[reply]

  • Computer
    • Windows
      • 1998
      • 2000
      • XP
        • SP1
        • SP2
        • SP3
      • Vista
    • Linux
    • Mac OS

Javascript assistance[edit]

Hello GregU, based on your work on this, I'm assuming you know your way around JavaScript and regexes. If it's not too much trouble, then, would you mind taking a look at the edit summary code in User:Dinoguy1000/scripts/ISO date format unifier.js and seeing if you can find why the summary doesn't get added when the summary field is blank? While you're there, also feel free to recommend other fixes or improvements as well. =) Thanks in advance! ダイノガイ千?!? · Talk⇒Dinoguy1000 18:36, 9 October 2009 (UTC)[reply]

Sure. The line   if( pageSummary.match(/[^\s]/) )   is explicitly saying to only augment the summary if there are already any (non-space) characters in it. I'm guessing this if was supposed to be checking newPageSummary instead; that would make sense.
In terms of suggestions... I would tighten up your regex start and end requirements, as right now it would match the date inside 8492931-05-3583-7, which might be an ISBN or other id number. Just ensure the surrounding chars are not digits or dashes. On the right side you can do this non-intrusively by adding the look-ahead assertion (?![\w-]) which says the next thing must not be a letter, digit, or hyphen, but otherwise doesn't affect the logic. JavaScript doesn't support look-behind assertions, so on the left end you would need to explicitly match a preceding [^\w-] and then adjust the following code to ignore that extra character being eaten. Or... at least add a \b (word boundary assertion) to the left end, which may be good enough and will ensure the preceding character is not a letter or digit. Then no other code changes are needed. Add it here: /(\[\[)?\b([0-9][0-9]...
I recommend using a global .replace with a function given as the 2nd parameter, rather than this messy .exec loop I see in some scripts, which usually entails redundantly searching for the same string twice, keeping track of string indexes, etc. See my scripts for examples. Once you learn this technique, you'll appreciate how much cleaner it is. —GregU (talk) 23:34, 9 October 2009 (UTC)[reply]
It doesn't surprise me that it was messing up like that; I adapted the edit summary code from Wikipedia:AutoEd/core.js without really understanding everything it does – I'm doubting that particular line is even needed for this script, since newPageSummary will never be blank.
I agree you can safely omit this outer if statement.
I'm not the one who wrote the regex (or most of the script; I've simply been making adjustments here and there); it originally came from User:Remember the dot/ISO date format unifier.js. Really, I know very little of regexes (but I've seen enough of them to know that the date regexes really aren't optimal). However, if I'm reading what you wrote correctly, you're suggesting I replace the regex /(\[\[)?([0-9][0-9][0-9][0-9])(\]\])?-(\[\[)?([0-1][0-9])-([0-3][0-9])(\]\])?/ with /(\[\[)?\b([0-9][0-9][0-9][0-9])(\]\])?-(\[\[)?([0-1][0-9])-([0-3][0-9])(\]\])?(?![\w-])/ – and while we're on the subject, could I replace ([0-9][0-9][0-9][0-9]) with (\d{4})?
Yes that's what I meant. However now that I think about it further, the last part would work a bit better as ...([0-3][0-9])\b(?!-)(\]\])?/ Yes \d{4} is the same thing. I didn't suggest it as thought you might consider it more readable if all parts of the regex used the same style (i.e., it doesn't really affect the efficiency of the matching, just what is most human-readable), plus you might want to tighten the first digit of the year to be [12].
The .exec loop has bothered me since I first saw it, but I don't really know how to go about using a .replace in its place; would it be something like pageSource = pageSource.replace( /regex/, formatDate( date, formattingAmericanStyle ) ); (and if that's correct, how do I pull date from the regex? something like $1 $2 $3?)? ダイノガイ千?!? · Talk⇒Dinoguy1000 16:41, 10 October 2009 (UTC)[reply]
That's close. The parameters passed to the subroutine will be the same things you'd get in the array if using .match() or .exec() – the first param is the entire matched string and following params are each thing captured by parenthesis. You can either give a function name, with the parameters named elsewhere where that function is defined, or you can given an unamed (anonymous) function right there inline. I'll elaborate later.
BTW, thanks for semi-protecting my script. But now that I've moved it back into my area where it is automatically protected from other users' edits, would you mind removing the semi-protection on it again? It would keep the extra pink notice box from cluttering up the view when I edit it. —GregU (talk) 15:13, 11 October 2009 (UTC)[reply]
See this comparison of the .exec vs .replace methods, showing how much simpler the latter is. I took the liberty of simplifying a few things before even doing the comparison. The monthStringFromMonthNumber() and removeLeadingZero() functions are not needed at all, as they can be implemented in trivial ways. The former by looking up the month number in an array, and the latter by converting the string ("05") to a number (subtracting 0 does this) and then back to a string ("5"). Besides being shorter, the parts of the pattern match are named (year,month,day) in the latter method which also aids readability.
To be fair, the .exec method could be simplified. I found it pretty hard to understand. For one thing, the lastIsoRegexFoundAt part of this code is bogus because search() does not understand a second parameter. It is just ignored. —GregU (talk) 08:40, 12 October 2009 (UTC)[reply]
I've unprotected the script per your request; unfortunately, I don't really have time to review all the script stuff here now. If I don't get to it by about Thursday or so, feel free to whack me with a {{talkback}} notice. =) ダイノガイ千?!? · Talk⇒Dinoguy1000 19:38, 13 October 2009 (UTC)[reply]
Now that I've gotten more time, I've been implementing some of your suggestions (doing one thing at a time so I can test each change; unfortunately, Google Chrome is very fickle about bypassing/clearing the cache, so it's hard to test), and one thing I've noticed is that the new regex still converts ISO dates in URLs – http://www.example.org/1996-09-27/index.html should not be touched by the script (testcase). Thoughts? (just for complete unambiguity, the regex I am currently using is /(\[\[)?\b([0-9][0-9][0-9][0-9])(\]\])?-(\[\[)?([0-1][0-9])-([0-3][0-9])\b(?!-)(\]\])?/) ダイノガイ千?!? · Talk⇒Dinoguy1000 17:16, 15 October 2009 (UTC)[reply]
You can borrow a trick from my dashes.js script to add pseudo "look-behind" to ensure you're not in a link. Assuming you're using the simpler .replace() technique, see this new version. It takes the preceding 260 characters (an optimization; don't make the poor regex search through entire page up to this point; a preceding [[ should occur with 260 since max page title is around 250–255). If finds a [[ within that substring with no following ]] then this is a link name, so don't touch. (Replace with the original string, resulting in no change.) Perhaps unlikely for ISO dates; that's left over from dashes.js. The URL heuristic is, if it finds a colon, slash or percent sign with no [\s|>] between it and the ISO date, then it's in a URL or some other funky ID-like string. For this code to work, I added the optional "pos" and "string" parameters to the replace function. String is the entire string being searched, and pos is the index of where the current match was found in it. —GregU (talk) 20:11, 15 October 2009 (UTC)[reply]
I've updated my script with your first sandbox suggestion above, but Chrome is being fickle again, so I'm having a hard time testing, which means I can't try your above suggestion just yet (and, therefore, this is more a note to myself so I don't forget about this later =) ). ダイノガイ千?!? · Talk⇒Dinoguy1000 18:17, 16 October 2009 (UTC)[reply]

Dash script[edit]

Hi Greg, I must say I was surprised to see this suddenly in the menu at the top. You must have influence to have had it inserted generally.

It seems to work very well. I'm delighted it's been added. It fixes only hyphens that are used wrongly for number/date ranges (not em dashes—I can see why), and doesn't correct wrongly spaced existing or treated en dashes (that would be very complicated). Tony (talk) 12:03, 10 November 2009 (UTC)[reply]

Thanks Tony. It is not added generally; you only see it because you added it to your monobook.js, apparently while sleep-walking. I've advertised it to the FAC folks and am planning to mention it on MOS talk yet, where I figured it would then come to your attention. Yes some of the common mistakes are hard to automate. If you notice common cases it misses that you think it can catch, please let me know on the script's talk page. —GregU (talk) 12:41, 10 November 2009 (UTC)[reply]
Ah, now I remember: I did add it. What a fool; I'm not very good with computers, except for the very familiar functions. I know that User:Ohconfucius is interested in what you call the look-behind function, to stop the date-unlinking script from touching dates in image/file names (can be a major nuisance). Tony (talk) 14:46, 10 November 2009 (UTC)[reply]
Well, I'd be interested "in due course". If I get too interested too soon, I may get my wrist slapped again ;-) Ohconfucius ¡digame! 15:38, 10 November 2009 (UTC)[reply]

dash bot query[edit]

Hi Greg

Does the bot change the minus sign into an en dash? Please see this diff. Tony (talk) 09:07, 24 November 2009 (UTC)[reply]

It can change a minus sign into an en dash in some cases where it is obviously wrong (e.g., 1943−1997). It did not do so in this edit. This edit looks all correct (as intended), either changing spaced hyphens to spaced en dashes or changing symbolic − signs to literal minus signs. In Firefox, I can tell minus signs from en dashes, as minus signs are a pixel higher. —GregU (talk) 15:09, 25 November 2009 (UTC)[reply]
By the way, I noticed from your edit summary that you're using a slightly dated version of my dashes tool. You may want to replace all that dashes code with the single line importScript("User:GregU/dashes.js"); so that you're always using the latest version (and so your monobook.js is simpler). —GregU (talk) 15:21, 25 November 2009 (UTC)[reply]
Ta, will do now. Tony (talk) 16:24, 25 November 2009 (UTC)[reply]

Would this be considered an avoidable false positive? The hyphens in 51-830 and 51-890 appear to have been converted into dashes... Ohconfucius ¡digame! 09:16, 15 December 2009 (UTC)[reply]

This one is hard to avoid. The surrounding words don't provide a clue that it is an ID number instead of a range. So it uses a heuristic where it looks at the difference in magnitude of the numbers as compared to their precisions. Currently, with 2 significant digits of precision, it is assumed to be range if the second number is within 50 times the first number. But 51-830 does seem like an odd range so possibly I can fine-tune this rule better. 51-830 looks like an ID to me, but 50-830 looks more like a range... yet both have precison 2 ("83")... I'll have to think about this. There will always be cases where it guesses wrong, it's just a matter of minimizing those.
I see there were also some false negatives in this one that it should catch, like "8 Dec 1957-31 Mar 1992" and "31 Mar 1992–Present". —GregU (talk) 16:12, 15 December 2009 (UTC)[reply]
Greg, if you're in the script-writing mood, "X-Present" could go to "X–present" with a small p. Don't know whether that would be risky. Also, please see phone numbers here, with hyphens converted to en dashes. [1]. Tony (talk) 12:20, 16 December 2009 (UTC)[reply]
And here, the double hyphens don't convert. They should be spaced en dashes, I guess; but this may not be feasible. Tony (talk) 09:44, 17 December 2009 (UTC)[reply]
Thanks Tony. Keep them coming, I will look into these, I just haven't had time lately to sit down and seriously work with it. I had a phone number checker in the original version of the script but took it out because I didn't think phone numbers occurred on Wikipedia. —GregU (talk) 14:43, 18 December 2009 (UTC)[reply]

Hotkeys[edit]

I just installed hotkeys.js (on User:Ucucha/vector.js). It's a great tool, but I have two issues: it's not compatible with wikEd, in that the hotkeys don't work when wikEd is enabled; and for me at least, the hotkeys both insert the defined text and do what the default MediaWiki keys do (for example, when I use Ctrl+M it inserts the defined text, but also tries to move the page). It would be great if you could fix these issues. I'm using Firefox 3.5.5 on Mac OS X 10.5. Thanks, Ucucha 16:23, 25 November 2009 (UTC)[reply]

I'll see what I can do when I get a chance, but am not sure how soon that will be as have been busy in real life. —GregU (talk) 06:28, 30 November 2009 (UTC)[reply]
Thanks; I hope you'll have time to do something about it, but, of course, I can also live without it. Ucucha 13:03, 30 November 2009 (UTC)[reply]

Dash script[edit]

Hi there. A couple of things on your dash script need fixing; can you see User talk:GregU/dashes.js when you get the time? Thanks, Dabomb87 (talk) 03:19, 16 February 2010 (UTC)[reply]

Hello GregU, I'm Airplaneman. Nice to meet you! I am here to inquire about your dashes script (which I have used hundreds of times to fix articles! It's great!). I have posted at User talk:GregU/dashes.js#Substituting dashes with their written-out Wikicode equivalents. May you please take a look when you have the time? Thank you, Airplaneman talk 01:29, 24 February 2010 (UTC)[reply]

The script![edit]

I do have to say that your dash script is absolutely fabulous, but the general convention (at least around FLC) has been that blank table cells should use em-dashes, rather than en-dashes. If you wouldn't mind making that minor adjustment, it would be much appreciated. Thanks! KV5 (TalkPhils) 13:05, 5 February 2010 (UTC)[reply]

I thought the consensus was that either is acceptable. It is a consensus I do not personally agree with: en dashes are usually the perfect size for tables. Tony (talk) 01:09, 6 February 2010 (UTC)[reply]
I prefer em dashes myself (en dashes seem to be dwarved by cells, while hyphens are almost invisible), but I agree that either type of dash should be acceptable (assuming the article is consistent). Perhaps you (GregU) should disable the table dashing function altogether; putting them in is pretty easy with a search-and-replace tool such as WikiEd or a word processor. Dabomb87 (talk) 01:49, 6 February 2010 (UTC)[reply]
But I thought this script changed only hyphens into en dashes within tables, and left em dashes as they are ...? Tony (talk) 01:56, 6 February 2010 (UTC)[reply]
Anybody there...? Dabomb87 (talk) 23:29, 3 March 2010 (UTC)[reply]
Sorry I haven't looked either of these issues this yet... I keep meaning to as first priority when I can get a block of time to work with Wikipedia. Will try to get to it this week. —GregU (talk) 05:56, 4 March 2010 (UTC)[reply]

Random links[edit]

Hi - I've added your script but keep getting an 'unable to comply' message - is there something else I need to do?   pablohablo. 10:02, 7 February 2010 (UTC)[reply]

It looks like there is a conflict with linkclassifier.js. I'll see if I can update my script to avoid the conflict. Meantime, if you temporarily disable linkclassifier, my script should work. GregU (talk) 21:39, 9 February 2010 (UTC)[reply]
Thanks!   pablohablo. 22:02, 9 February 2010 (UTC)[reply]
I've updated randomlink.js so that it is now compatible with linkclassifier.js. Thanks for reporting the problem. —GregU (talk) 16:20, 16 February 2010 (UTC)[reply]
Your script is now being used more widely. It's a signficant improvement in our ability to get rid of squidgy little hyphens used inappropriately. Thanks! Tony (talk) 07:46, 4 March 2010 (UTC)[reply]

Your dash-replacement bot[edit]

Greg, I'm passing on this suggestion, which was posted on my talk page. Tony (talk) 23:30, 15 March 2010 (UTC)[reply]

You may want to reconsider the wisdom of your dash-replacement bot, as replacing HTML character entities with the actual character they represent could potentially cause problems with web browsers that don't handle character encodings properly. The character entities are guaranteed to work, and having them in the text does no harm; removing them could cause problems. I'm not sure what productive purpose is served by removing them. Kurt Weber (Go Colts!: 16-0 and Super Bowl XLIV Champions) 21:08, 15 March 2010 (UTC)[reply]

Airplaneman had a similar suggestion which I still haven't responded to. I have my doubts that the actual characters are any less reliable than the entities, and the majority of editors seem to prefer the actual characters, which make the wikitext more readable. Also, note that wikEd can be used if you need to easily see what kind of dash is what while editing.
Having said that however, it was never a designed purpose for my script to convert characters to the entities. It is a side-effect... done as a pre-processing step to simplify the main regex rules. When I run my script, if I notice the only change was these conversions and there were no real dash fixes, I don't save the result to avoid changing the internal style for no reason.
To address the concerns, I will at least modify the script so that if it didn't do any real fixes, it won't modify the encoding style. Possibly I will go a bit further and allow a user-customizable setting: Convert all to actual characters, Convert all to entities, or Convert all to whatever style was predominant in that article. —GregU (talk) 14:53, 17 March 2010 (UTC)[reply]
The script has been modified to not gratuitously change encodings when no fixes are being made. —GregU (talk) 06:32, 19 March 2010 (UTC)[reply]
Thanks, Greg. That seems reasonable. I should add that I, too, dislike the gobbledy in edit mode, and it seems yet another barrier to our newbies and visitors.
Meanwhile, another issue has come up. Template_talk:Infobox_SCOTUS_case#WP:MOSDASH. Tony (talk) 13:40, 19 March 2010 (UTC)[reply]
Greg, have you made the SCOTUS change? I think simply excluding it would be the best option. In my travels I've seen no examples of its use in the main text. Thanks! Tony (talk) 09:21, 23 March 2010 (UTC)[reply]
Ok, I've made this change now. —GregU (talk) 09:51, 23 March 2010 (UTC)[reply]

Thanks for addressing it :). I tried it in my sandbox, and it's still replacing n and m-dashes with the dashes themselves; I might have missed something here, but maybe you only fixed the bot's script? Airplaneman talk 14:20, 19 March 2010 (UTC)[reply]

It currently still replaces entities if it is making any fixes. But it is better than it was, not changing them when not absolutely needing to to make real fixes. I may improve it further yet, as mentioned above. —GregU (talk) 06:10, 25 March 2010 (UTC)[reply]

I just followed a link to here. I believe that such scripts should pretty much always replace character entities with the actual character. About the only exceptions will be nbsp and thinsp. The future is what we make it, and it's not ASCII. — Jack Merridew 18:46, 5 April 2010 (UTC)[reply]

Vector[edit]

Hi Greg, do you plan to make the dash script compatible with Vector? Or, is it ready now and is there something I have to do to make it work? Thanks, Dabomb87 (talk) 02:38, 3 April 2010 (UTC)[reply]

Ah, I was about to say something similar. I use the script all the time; I'll be at a loss if it doesn't work suddenly. Tony (talk) 13:56, 3 April 2010 (UTC)[reply]
I just copied it over to a vector page: works fine! Maybe a note to users is necessary. Tony (talk) 14:13, 3 April 2010 (UTC)[reply]

dash script[edit]

Hi Greg. I use your dash script all the time, but tonight, for the first time ever, it fixed a hyphen within a {{sortname}} template and broke the link. Just thought you should know. The edit was this one, focus on the top link, the one to an ambiguous Mick O'Brien. All that aside, your script is excellent, keep up the great work. The Rambling Man (talk) 19:38, 2 May 2010 (UTC)[reply]

Thanks for letting me know. I've updated it to not touch hyphens inside of sort templates. —GregU (talk) 12:53, 3 May 2010 (UTC)[reply]
Greg, it seems to have changed the hyphens in a temperature table into en dashes with disastrous results. They're better as en dashes, of course, and all but mathematicians (and a strict reading of MOSNUM) requires them. But sadly they're back to squashy little hyphens. [2] Tony (talk) 03:54, 1 June 2010 (UTC)[reply]
The problem happens because the negative numbers in this template were formatted non-standardly with a space between the hyphen and the digits. So it doesn't look like a negative number to my script. I did a survey of other pages that use this template and this problem looks rare (I didn't find any other cases), so I'm going to leave it to the user to catch this. —GregU (talk) 08:42, 15 June 2010 (UTC)[reply]

Simple Wikipedia[edit]

Hello GregU, it's Airplaneman. I was wondering if we could somehow port this script over to Simple Wikipedia so it can be used there. It would help a lot – right now, I'm copying to my sandbox, running the script, and copying back (with a link to the script in my edit summary, of course :D). Thanks, Airplaneman 05:39, 5 July 2010 (UTC)[reply]

wikEd and FixDashes[edit]

Please see my reply under User_talk:Cacycle/wikEd#FixDashes_contribution. Cacycle (talk) 19:49, 25 August 2010 (UTC)[reply]

You might want to see if this would fit into Wikipedia:AutoEd, which does some similar things. ---— Gadget850 (Ed) talk 14:41, 18 September 2010 (UTC)[reply]
[Missed this when you first posted it.] Actually I designed dashes.js to work with AutoEd. You'll find it listed there as a user module. —GregU (talk) 05:05, 6 October 2010 (UTC)[reply]

Dash script and minus signs[edit]

Hi Greg: it appears that the script changes minus signs into en dashes: − into –. Could you alter it so it leaves the minus-sign code intact? Minus signs are different from en dashes, although only slightly. Mathematicians (and the MoS) insist on them. Tony (talk) 11:20, 8 September 2010 (UTC)[reply]

Hi Tony... my script does not do that (please provide diff link if you disagree). It does turn − into a literal minus sign, as a preprocessing step. Recall, this behavior has come up before (5 sections above), and I modified the script to not do this gratuiously, but rather only as a side-effect when making real fixes.
I just had one idea to help you and I both track cases where the script could be better. When you see places the script missed, why don't you tack on a note like "GREG - missed a dash in 2nd table" to the end of the edit summary. That way I can go back through your contributions and search for "GREG" (or whatever keyword you wish to use) and find places to improve. And it's easier for you too, as you don't need to leave a talk message for every little glitch. (Not to imply that's what you're doing here!) Just an occasional short reminder to me to look through your contribs for problems you've found recently.
I have a lot less idle time to play with Wikipedia these days (a good thing), but still enjoy maintaining and tuning my scripts when I get a chance. —GregU (talk) 02:29, 9 September 2010 (UTC)[reply]
Thanks, yes, good idea. Tony (talk) 03:33, 9 September 2010 (UTC)[reply]
Greg, if you're around before Tuesday, the dash tool is being written up at The Signpost. Tony (talk) 08:56, 18 September 2010 (UTC)[reply]
Thanks for the heads up! —GregU (talk) 13:08, 22 September 2010 (UTC)[reply]

(Now there's a subject I never in my wildest dreams imagined I'd ever write about!)

User:GregU/dashes.js does WP:OVERLINK fixing, which has recently been discussed at WT:BISE (a forum for discussing use of the term "British Isles"). It looks like the script is de-linking every instance of "British Isles" (and other articles), including the first. Is that expected? I understand that certain words and phrases probably shouldn't be linked at all, but "British Isles" seems to be something that should be linked to on the first occurrence. Help! TFOWR 20:23, 4 October 2010 (UTC)[reply]

Hi, I see Tony already replied on WT:BISE. The delinking was done independently of my script; my script only alters hyphens, dashes and minus signs. —GregU (talk) 06:32, 5 October 2010 (UTC)[reply]
It would have helped if I'd actually checked the source for the script before making vague accusations... apologies for that. TFOWR 11:59, 5 October 2010 (UTC)[reply]

scripting help[edit]

I like how the dash script is activated by the drop-down tab button (as opposed to the more common side bar button). However, looking through the code, I could not find how it's done. I found a bit of code somewhere else. I get a drop-down button, but still have difficulty understanding the code and getting it to work properly. Could you perhaps help me to build the relevant addhook function for my common terms script, please? Many thanks in advance. --Ohconfucius ¡digame! 04:44, 21 September 2010 (UTC)[reply]

Hi Ohconfucius. It looks like you found the right code. The addPortletLink() function is documented here. Having it appear in the drop-down was actually not intentional, but rather a side-effect of how the new vector skin works. If you add an item to the "p-cactions" portlet (menu) in vector, it appears in the dropdown. If using the monobook skin, the same code will just add it to the visible horizontal menu. (I see that vector defines a new portlet called "p-views" which is where the Read, Edit, and View history tabs now go; that portlet doesn't exist in monobook.)
You don't see it in my code because I'm piggybacking off of AutoEd to add the button. The bottom of Wikipedia:AutoEd/core.js calls addPortletLink().
So in your script, it should just be a matter of changing 'p-tb' to 'p-cactions'. And I'd also rename 't-commonterms' to 'ca-commonterms' just to keep the ids orderly. Then if the user is using vector, it should appear in the dropdown. If the user is using monobook, it will appear in the visible horizontal menu. —GregU (talk) 14:15, 22 September 2010 (UTC)[reply]
  • Thanks for your help. I now have supplementary questions:
  1. I did as you suggested and changed 'p-tb' to 'p-cactions'. Now the drop-down now appears, but only in edit mode. How did you get it to appear in 'read' mode?
  2. I am currently trying to run your script from another. In that script, I called up autoEdFunctions(), but it seems not to execute all the functions when executing User:GregU/dashes.js. Should I be calling up other functions too? --Ohconfucius ¡digame! 06:36, 23 September 2010 (UTC)[reply]
  1. You have to add some extra harnessing to make it work in view mode. The trick is, if you're in view mode, your menu item calls edit mode with an extra "special" parameter that your script recognizes. Your script reruns on the edit operation and if it sees this extra param in the URL, it knows the user just clicked on it from view mode so it immediately does the processing. In my dashes script, this is done by the AutoEd framework that I'm using so you don't see it. You can see it in Wikipedia:AutoEd/core.js – search for AutoEdit=true and autoEdQueryString. Or see this simpler version in an old version of my dashes test – search for dashes=true.
  2. I don't know, it seems like that should work. Though I hadn't given any thought to making my script callable from other scripts. You could instead just try calling autoEdDashes() on the wikitext. The other stuff done by autoEdFunctions() isn't really needed. —GregU (talk) 04:59, 6 October 2010 (UTC)[reply]

year-present[edit]

  • Greg, I see that it leaves "year-present", which occurs a lot, with a hyphen. Here's an example. I guess there's no easy way of fixing this. Tony (talk) 11:38, 5 October 2010 (UTC)[reply]
Thanks for letting me know. I think it is only missing it when the year is a link. It is supposed to handle that case too but looks like it has a bug. I will look at it when I get time. —GregU (talk) 05:25, 6 October 2010 (UTC)[reply]
Thanks, Greg. And the same issue pertains to start dates alone, such as "(1949-)", often with an ungainly space because the hyphen looks so squashy, but even worse: "(1949- )". Again, I'm unsure this can be incorporated. BTW, I suspect you've tweaked it more recently to remove the spaces from "2002 - 2005" and "2002 – 2005". Niiiiice. Tony (talk) 06:44, 6 October 2010 (UTC)[reply]

Barnstar[edit]

The Original Barnstar
This one is long overdue. After using your dashes.js script for more than a year, I have nothing but good words to say about it. It is exemplary in its comprehensiveness and reliability. Thank you! —Quibik (talk) 17:17, 20 October 2010 (UTC)[reply]

Thanks Quibik, this means a lot to me! I'm sorry I took so long to respond... went and got hitched, and not finding time to get back to Wikipedia. —GregU (talk) 14:21, 25 February 2011 (UTC)[reply]

Hotkeys[edit]

Hi Greg, I am interested in using your hotkeys.js script as I use a lot of en dashes, and scrolling down to find it on the insert bar is inconvenient. I think I installed it correctly but I can't get any of the hotkeys to work, and Ctrl- just reduces the text size in Chrome. Any ideas? Thanks in advance. –CWenger (talk) 16:39, 4 January 2011 (UTC)[reply]

false positives in climate charts[edit]

I don't know whether it's stylistically correct to use the endash to display temperatures... In my own script, I call on autoEdFunctions() used in your script. A transformation made apparently caused problems with the correct display. (see correction diff). Please advise whether correction of same is within your province, or whether I should contact the template programmers or those responsible for AutoEd. Cheers, --Ohconfucius ¡digame! 05:26, 18 January 2011 (UTC)[reply]

As GregU seems to be inactive since October, I'll make a quick response. What you are seeing there are not en dashes but minus signs (they appear quite the same, though). Using them instead of hyphens in that context is generally recommended (see here and here). The {{climate chart}} template has problems with the minus signs because it presumably uses the numbers in mathematical calculations, so it demands hyphens. However, the template also converts the hyphens into proper minus signs in its final output. So the only issue here is that the dashes.js script should be ignoring the contents of the {{climate chart}} template when parsing. This is certainly doable, but GregU is the only one with access to the script, so I'm afraid I can't help. Let's just hope GregU is not inactive after all. —Quibik (talk) 07:28, 18 January 2011 (UTC)[reply]
Greg, got some false positives here. Low priority for you, though! Tony (talk) 07:33, 8 February 2011 (UTC)[reply]
another false-positive here which broke a url. --Ohconfucius ¡digame! 06:01, 22 February 2011 (UTC)[reply]

User talk:GregU/randomlink.js[edit]

Hi, I was just wondering, does this tool not work with the new Wikipedia layout? I used to like using this, but didn't notice it disappeared. Is there any way you can tweak it to work again? Thanks, Blake (Talk·Edits) 14:28, 24 February 2011 (UTC)[reply]

  • I notice that you don't have a vector page. The new skin does not work with monobook, so you need to create a vector file to import the script:
  1. Assuming that you are now using the new skin... Open/create your vector.js page by clicking on this link.
    • Alternatively, go to your user page and append '/vector.js' to the end of the URL.
  2. Copy the following command onto your vector.js or monobook.js page:
    importScript("User:GregU/randomlink.js") 
  3. Save the page and (re-)load it – refresh the cache by following the instructions at the top of your vector.js page.
  4. --Ohconfucius ¡digame! 14:39, 24 February 2011 (UTC)[reply]
    Thanks! It seems to be working now. I think the tool's page could use updating to reflect this so other users who have the same problem as me could fix it. Blake (Talk·Edits) 15:20, 24 February 2011 (UTC)[reply]

Thanks for covering for me Ohconfucius. And thanks for pointing out the documentation rot Blake, I've updated it now. Will try to get back to the dashes issues above too, so keep pointing out the glitches. —GregU (talk) 14:26, 25 February 2011 (UTC)[reply]

Family tree[edit]

I posted a request at Wikipedia_talk:WikiProject_Genealogy#Hotung a while bqck, and there hasn't been much of a response. SO I've loaded your script and will be trying it soon. Hope it is as easy as you suggest to create a family tree, and/or that you will hang around! :-) --Ohconfucius ¡digame! 15:04, 25 February 2011 (UTC)[reply]

A bug in dashes script[edit]

Dashes script changes dashes in image names that breaks link to them. This is a somewhat messy example (see "gallery" in this edit). Otherwise great script. Cheers. Materialscientist (talk) 04:45, 27 February 2011 (UTC)[reply]

Problem installing dashes[edit]

Hi Greg. I created User:Epipelagic/vector.js, and added your script and shift-reloaded, but no "–" tab has been "added to the tabs at the top" of anything that I can see. I use Firefox on a Mac. Javascript is enabled, and I don't use wikEd or AutoEd. What I am doing wrong? --Epipelagic (talk) 00:35, 28 February 2011 (UTC)[reply]

  • Assuming you have refreshed the browser cache after changing vector to import the script, the button for the dashes isn't too prominent. It's a horizontal line that sits in the drop-down tab on the right of the watchlist 'star' at the top. (see screenshot). Hope this helps. --Ohconfucius ¡digame! 00:54, 28 February 2011 (UTC)[reply]

Possible enhancement to dashes script[edit]

Hi Greg. I wonder if you have considered adding a feature to the dashes script that removes spaces around em dashes. I see this a lot, against what the WP:MOS says, and it would be a very simple addition. –CWenger (talk) 16:20, 26 March 2011 (UTC)[reply]

Family Tree javascript[edit]

I tried importing User:GregU/familytree.js in my common javascript file at User:Banaticus/common.js but I'm not seeing anything different when I edit posts. What should I be seeing, how does it help? Please let me know on my user page when you return from your Wikibreak, thanks. :) Banaticus (talk) 04:55, 27 March 2011 (UTC)[reply]

I thought I was having the same issue, but look in your toolbox (to the left). -- PlaydoughRevisited (talk) 22:08, 30 July 2011 (UTC)[reply]
I don't see anything under the Toolbox link in the left hand column. What should I be seeing? Banaticus (talk) 08:41, 25 January 2012 (UTC)[reply]

Dash Script Bug - DentalFormula[edit]

Some users have been using your script and causing problems with the DentalFormula as can be seen here [[3]] and here [4]]  FrostedΔ14  01:56, 30 April 2011 (UTC)[reply]

Frosted: is it a range? Possibly not, from looking at the template. If not a range, yes, the dash script needs to exclude this. If it is a range, the template needs to be changed. Tony (talk) 09:02, 30 April 2011 (UTC)[reply]
Yes, it is a range. It should look like this 3.1.3-4.13.1.3-4.1 but after your script has it way it looks like this 3.1.3–4.13.1.3–4.1
(Meaning 3 incisors, 1 canine, 3 or 4 premolars and 1 molar) I had a look at Template:DentalFormula but don't really know how it works. Regards,  FrostedΔ14  23:52, 30 April 2011 (UTC)[reply]
So, I figured out the workings of templates AND displaying a formula... I tried many combinations (\tfrac \over \text) but its seems TeX does not like any kind of dash except the common minus sign "-". My only thought is to exclude Template:DentalFormula from processing in your script unless you can figure a way to make the template work. Regards,  FrostedΔ14  01:38, 1 May 2011 (UTC)[reply]
If you wrap the "upper" and "lower" in the template inside of \mbox{ }, it will break out of the math parser for parsing the ndash (see Template:DentalFormula/sandbox). However, the font size is now the same size as the surrounding text (e.g., ). There is probably a way to fix this as well, but I would have to do more testing. Thanks! Plastikspork ―Œ(talk) 19:19, 1 May 2011 (UTC)[reply]
That looks acceptable to me. If you feel comfortable modifying the template, keeping in mind it is used on very many pages, go for it!  FrostedΔ14  22:05, 2 May 2011 (UTC)[reply]
Oh my! I just noticed Plastikspork is one of the authors of the template. How embarrassed am I..  FrostedΔ14  22:48, 2 May 2011 (UTC)[reply]

bug[edit]

Sorry, just what you didn't want to hear! The spacing in date ranges is different depending on mdy or dmy. In particular, a squashed "1952–11 May 1956".

http://en.wikipedia.org/w/index.php?title=508th_Aerospace_Sustainment_Wing&action=historysubmit&diff=430361347&oldid=430031693

http://en.wikipedia.org/w/index.php?title=508th_Aerospace_Sustainment_Wing&action=historysubmit&diff=430361870&oldid=430361347

Thanks! Tony (talk) 15:47, 22 May 2011 (UTC)[reply]

An idea[edit]

You may be interested in User_talk:GregU/dashes.js#AutoEd_help and Wikipedia_talk:AutoEd#Choosing_your_own_modules_is_very_unclear. --Piotr Konieczny aka Prokonsul Piotrus| talk 16:55, 5 July 2011 (UTC)[reply]

A barnstar for you![edit]

The Technical Barnstar
For your awesome dashes script—it saves a lot of work! InverseHypercube 00:50, 5 August 2011 (UTC)[reply]

A barnstar for you![edit]

The Technical Barnstar
For your amazing dash script :) ♫Greatorangepumpkin♫Heyit's meI am dynamite 14:52, 24 August 2011 (UTC)[reply]
Can you modificate your script, so that it still change it to n-dashes after non-breaking spaces? Like here it did change only one instance of "hyphen -> n-dash", but didn't change the other one in the "Personnel" section. Thanks.--♫Greatorangepumpkin♫Heyit's meI am dynamite 12:04, 30 August 2011 (UTC)[reply]

Dashes and AutoEd[edit]

I can't get dashes to work with AutoEd. I've asked for help at WT:AutoEd and at dashes.js talk but no luck so far. Any suggestions? Thanks! —danhash (talk) 21:52, 8 December 2011 (UTC)[reply]

More info here. —danhash (talk) 19:39, 26 January 2012 (UTC)[reply]

Saudia Flight 163[edit]

Hi! It's been awhile, but I found the report on Saudia Flight 163 on Skybrary.aero. It's in English too WhisperToMe (talk) 09:56, 26 December 2011 (UTC)[reply]

Vector.js in article space[edit]

Hi. Did you mean to create Vector.js as a user subpage? -- ArglebargleIV (talk) 14:30, 6 January 2012 (UTC)[reply]

  • It has to be in your own userspace for you to be able to use it. Just follow the procedure shown here. The same applies to all scripts; just change the script address depending on the script to be installed. --Ohconfucius ¡digame! 15:23, 6 January 2012 (UTC)[reply]

Proposal to shut down WP Geographic Coordinates & ban coordinates on wikipedia articles[edit]

This means you. --Tagishsimon (talk) 11:54, 17 January 2012 (UTC)[reply]

A barnstar for you![edit]

The Brilliant Idea Barnstar
Thanks for the great dash script. It's saved me loads of time! Delsion23 (talk) 21:47, 20 March 2012 (UTC)[reply]

Invitation to events: bot, template, and Gadget makers wanted[edit]

I thought you might want to know about some upcoming events where you can learn more about MediaWiki customization and development, extending functionality with JavaScript, the future of ResourceLoader and Gadgets, the new Lua templating system, how to best use the web API for bots, and various upcoming features and changes. We'd love to have power users, bot maintainers and writers, and template makers at these events so we can all learn from each other and chat about what needs doing.

Check out the the Berlin hackathon in June, the developers' days preceding Wikimania in July in Washington, DC, and our other events.

You can register now for the Berlin event and if you need financial help or visa help, just mention that in the registration form.

Best wishes! - Sumana Harihareswara, Wikimedia Foundation's Volunteer Development Coordinator. Please reply on my talk page, here or at mediawiki.org. Sumana Harihareswara, Wikimedia Foundation Volunteer Development Coordinator 13:53, 2 April 2012 (UTC)[reply]

I want to specifically invite you to the yearly Berlin hackathon. It's 1-3 June and registration is now open. If you need financial assistance or help with hotel/hostel, just mention it in the registration form.
This is the premier event for the MediaWiki and Wikimedia technical community. We'll be hacking, designing, and socialising, primarily talking about Gadgets, the switch to Lua, Wikidata, and Wikimedia Labs.
Our goals for the event are to bring 100-150 people together, with lots of people who have not attended such events before. User scripts, gadgets, API use, Toolserver, Wikimedia Labs, mobile, structured data, templates -- if you are into any of these things, we want you to come!
Details: https://www.mediawiki.org/wiki/Berlin_Hackathon_2012
Thanks to Wikimedia Germany for hosting and coordinating this event. (Venue still to be determined.) — Preceding unsigned comment added by Sumanah (talkcontribs) 13:54, 2 April 2012 (UTC)[reply]

timezone minus signs[edit]

Greg, your dash fixer continues to have a major positive impact on the project. It's great to have the timezones in infoboxes rendered by proper minus signs, but I discovered extra spaces in this edit. When you have time. Thx. Tony (talk) 13:02, 10 April 2012 (UTC)[reply]

  • I believe it's actually an endash to start with, to which the script adds a space. --Ohconfucius ¡digame! 15:32, 10 April 2012 (UTC)[reply]

Spaces in a particular context[edit]

Greg, is it possible to remove the spacing in this context so that, for example, [[May 21]]-[[May 22|22]] becomes May 21–22, not May 21 – 22? Thanks. Tony (talk) 07:51, 18 May 2012 (UTC) Here's an example. Tony (talk) 04:36, 28 May 2012 (UTC)[reply]

  • dashes doesn't unlink, but it will automatically change [[May 21]]-[[May 22|22]] into [[May 21]] – [[May 22|22]]. However, if dashes saw May 21-22, or May 21 – 22, it won't act on the hyphen or the dash. Presumably the correct form is the unspaced dash? --Ohconfucius ¡digame! 13:40, 1 June 2012 (UTC)[reply]

Question about dashes[edit]

Hi Greg, I don't know whether you'll see this, but I'm looking for some advice regarding User:GregU/dashes.js. I've added this to my monobook because I'm tired of having to search for en dashes, so I've decided to use hyphens instead, even if it's wrong. Then I saw your script and thought I could run it on articles where I'm using hyphens. So I added it to my monobook page but nothing has changed that I can see (nothing new in the toolbox, for example). Can you advise? SlimVirgin (talk) 22:49, 18 October 2012 (UTC)[reply]

Script is down[edit]

Hi Greg. Suddenly the button has gone, replaced with "auto ed". Any ideas? Tony (talk) 08:53, 27 October 2012 (UTC)[reply]

breaking redirects[edit]

Wanted to make sure you had noticed the discussion at User talk:GregU/dashes.js#Redirects.—Kww(talk) 19:03, 24 April 2013 (UTC)[reply]

Galician versions[edit]

Hi, I only wanted to advice you that I have translated and adapted your familytree and hotkeys scripts to the Galician wikipedia here and here. Thanks for your work, bye, --Elisardojm (talk) 00:54, 16 July 2015 (UTC)[reply]

Hi,
You appear to be eligible to vote in the current Arbitration Committee election. The Arbitration Committee is the panel of editors responsible for conducting the Wikipedia arbitration process. It has the authority to enact binding solutions for disputes between editors, primarily related to serious behavioural issues that the community has been unable to resolve. This includes the ability to impose site bans, topic bans, editing restrictions, and other measures needed to maintain our editing environment. The arbitration policy describes the Committee's roles and responsibilities in greater detail. If you wish to participate, you are welcome to review the candidates' statements and submit your choices on the voting page. For the Election committee, MediaWiki message delivery (talk) 16:16, 23 November 2015 (UTC)[reply]

Minor glitch with dash script[edit]

Hi Greg,

I see you haven't edited in three years, so I hope real life is treating you well. I use your excellent dash script all the time, and just wanted to report a very minor problem – the first I've found! When run on this version of Apple Inc., the script wants to change the second hyphen in <!-- 9:55 AM ET-->, which of course breaks the comment.

Cheers, Adrian J. Hunter(talkcontribs) 05:31, 19 December 2015 (UTC)[reply]

Thanks for the dashes script![edit]

I'm kind of at fanboy level in the field of programming, so I'm still amazed at people like you who can do this kind of stuff. When I saw your sript I instantly added it. I'll take it for a test run for a few days and I'll be back for feedback if anything happens. In any case, thanks for your dedication, dude!
Cheers! Double Plus Ungood (talk) 16:02, 20 March 2018 (UTC)[reply]

MfD nomination of User:GregU/familytree[edit]

User:GregU/familytree, a page which you created or substantially contributed to, has been nominated for deletion. Your opinions on the matter are welcome; you may participate in the discussion by adding your comments at Wikipedia:Miscellany for deletion/User:GregU/familytree and please be sure to sign your comments with four tildes (~~~~). You are free to edit the content of User:GregU/familytree during the discussion but should not remove the miscellany for deletion template from the top of the page; such a removal will not end the deletion discussion. Thank you.  — Mr. Guye (talk) (contribs)  12:35, 20 July 2019 (UTC)[reply]