getElementsByClassName

edit

It looks like wikibits.js already has something called getElementsByClassName(). It's basically a combination of getElementsByTagName() and our hasClass() function. Their implementation of the class checking part is pretty much equivalent to ours, except that it doesn't cache RegExp instances across invocations, only within the function call... Mike Dillon 15:40, 3 January 2007 (UTC)Reply

addLink?

edit

The addLink helper function seems to be by far the most common dependency listed on WP:JS. In fact, the only other contenders are Add LI link and Add tab, which are older implementations of the same functionality, and Get Page Name, which is simply a deprecated wrapper around wgPageName. Thus, it seems to me that it might be a good idea to merge addLink into Common.js, so that it is available by default to all users. What do you folks think?

Of course, I could also just commit the code (or something equivalent, should there be license issues) directly to wikibits.js, thereby including it on all Wikimedia sites... —Ilmari Karonen (talk) 22:19, 6 January 2007 (UTC)Reply

wikibits.js, please. — Omegatron 21:31, 10 January 2007 (UTC)Reply
Yes, I would give it a bit more descriptive name though (addLinkToToolbar?) Also see Wikipedia talk:WikiProject User scripts#Calling_akeytt.28.29 for a note on efficiency. —Ruud 21:50, 10 January 2007 (UTC)Reply

A function called addPortletLink was added to wikibits.js recently. The only part it doesn't have it the ability to insert after a specific node (i.e. the after parameter). Wikipedia:WikiProject User scripts/Scripts/addLink has been updated to implement addLink on top of addPortletLink. Mike Dillon 04:17, 21 January 2007 (UTC)Reply

Hello

edit

Hello. I am not sure if this is the right place to ask... But someone changed something, and now when I press alt + w while editing messages, it automatically redirects page to watchlist added page while I am still editing the page, instead of just putting a check mark on the watchlist checkbox. Can anyone direct me to the discussions on this change? AQu01rius (User • Talk) 03:48, 21 January 2007 (UTC)Reply

I believe the changes you're interested in were actually made in wikibits.js, not on EN Wikipedia itself, so you might need to go to the wikitech-l mailing list. Simetrical and Ilmari Karonen were involved in the changes and may be able to offer better advice. Clearing your caching may help if you haven't done so. Mike Dillon 04:20, 21 January 2007 (UTC)Reply

morebits.js

edit

some common used functionallity I've used for my WP:TWINKLE I have located to User:AzaToth/morebits.js, perhaps you would like some of it in common.js. AzaToth 20:23, 24 January 2007 (UTC)Reply

Request new buttons for edit toolbar

edit

The default editing toolbar is excellent for most of the editing I do (occasionally I use wikEd, but it can be a bit slow for simple edits).

Is there any way that a couple more buttons could be added to the toolbar? I'm thinking in particular of:

  • <ref>...</ref>
  • <div id="">...</div>

There seems to be plenty of room on the 2nd row of the toolbar at present. NigelG (or Ndsg) | Talk 14:40, 26 January 2007 (UTC)Reply

Aha! Found the link to User:MarkS/Extra edit buttons on Help:Edit toolbar.