Plé MediaWiki:Common.js
Standard Scripts cuir in eagar
Imported Scripts cuir in eagar
Sub-scripts cuir in eagar
I think we should make sub-scripts as they've done at Wikipedia, though it may depend on how much code we have left after reviewing what's there! They have made some into subpages, but I think it would be better to name them based on the script that calls them.
Wikipedia currently have the following loaded by Common.js...
- w:en:MediaWiki:Sysop.js
- w:en:MediaWiki:Common.js/search.js
- w:en:MediaWiki:Common.js/IE60Fixes.js
- w:en:MediaWiki:Common.js/watchlist.js
- w:en:MediaWiki:Common.js/edit.js
I suggest (if we do this) that we name them along the lines of MediaWiki:Common search.js so they sort next to each other, but don't look so weird.
importScript cuir in eagar
Wiktionary have a fancier version of this, but I think we can do without since an importScript function has recently been included in wikibits.js.
The only script imported using the current function (including in userspace) is MediaWiki:Sysop.js (which doesn't exist yet!). Need to check the syntax is OK.
☸ Moilleadóir ☎ 16:40, 19 Meitheamh 2008 (UTC)
- The wikibits.js code looks like it effectively does the same thing, so I'll remove the function and comment out Sysop.js since we're not using it yet. ☸ Moilleadóir ☎ 01:51, 20 Meitheamh 2008 (UTC)
Access keys/tooltips cuir in eagar
We seem to duplicate a bit between Common.js and Monobook.js.
Wikibits.js suggests the function we use is deprecated, but I can't find an example of anyone else using updateTooltipAccessKeys() (I guess through creating a nodeList array instead of the ta array?).
Needs more research.
☸ Moilleadóir ☎ 16:40, 19 Meitheamh 2008 (UTC)
- Wiktionary: only set a few of these in Monobook.js but then they don't have to translate any labels
- Wikipedia: don't do this at all
- Wiktionnaire (fr): do a long list in Monobook.js (Common.js is empty)
- Wikipédia (fr): don't do this at all
- I think these can all be removed from Common.js since they only have English strings. The ones in Monobook.js might need more checking. At least some of the tooltips are already translated at translatewiki.net, so maybe that's where this stuff should go if we're not changing any access keys.
- This is the only code that Vicipéid have (!) and they put it in Monobook.js fwiw.
Interwiki links to featured article cuir in eagar
This seems to be something the Wikipedias do more than the Wiktionaries. Not sure if we need it, but I'll leave it in for now and translate the text. ☸ Moilleadóir ☎ 06:25, 20 Meitheamh 2008 (UTC)
The Wiktionary code for these is different to the Wikipedia code although they both seem to do the same thing. I'm looking into the pros and cons. One immediatly obvious thing is that en.wikt have a user preference set up so you can have them expanded by default. ☸ Moilleadóir ☎ 14:41, 21 Meitheamh 2008 (UTC)
Main page fixes cuir in eagar
Other sites don't seem to rename the tab any more. I'm guessing this was dropped because it's a fairly trivial use of JS. I've left it in for the time being. ☸ Moilleadóir ☎ 03:07, 23 Meitheamh 2008 (UTC)
Edittools cuir in eagar
We currently have a couple of different versions of these. I’ve been trialing the latest incarnation from Wikipedia (by w:en:User:Ilmari Karonen) and will soon enable it sitewide. It’s similar to the edit tools used on Commons, although that version uses actual buttons and this one simulated buttons. Not sure what the pros and cons of these approaches is, but the code is now quite different so can't be easily converted.
How it should work (in my possibly faulty understanding)
- MediaWiki:Common.js imports MediaWiki:Common: edit.js
- MediaWiki:Common: edit.js loads MediaWiki:Edittools.js
- MediaWiki:Edittools.js looks for a page element with the id "editpage-specialchars". This is currently an empty <div> in MediaWiki:Edittools. This element has it’s id changed to "editpage-newstyle" and is replaced by the tools in MediaWiki:Edittools.js.
However, when running wikEd it doesn't happen quite like that for some reason. Actually it's better because the tools end up inside the wikEd wrapper right under the save button, whereas otherwise they end up at the bottom of the page (except on talk pages where there appear at the top).
Confusing. Must come back to this later. ☸ Moilleadóir ☎ 06:44, 4 Iúil 2008 (UTC)
Removed "Technical restrictions" title fix cuir in eagar
I'm pretty sure this only applies to Wikipedia and is redundant here. diff ☸ Moilleadóir ☎ 16:21, 21 Bealtaine 2009 (UTC)
Removed Geo-targeted watchlist notice cuir in eagar
We don't use this at present. Mainly used for Wikipedia meetups. If we get heaps of users one day we can add it back, but I've removed it for now. diff ☸ Moilleadóir ☎ 16:31, 21 Bealtaine 2009 (UTC)
Removed WikiMiniAtlas cuir in eagar
Not used and not likely to be used in the near future, if at all. diff ☸ Moilleadóir ☎ 16:36, 21 Bealtaine 2009 (UTC)
Removed Main Page deletion image cuir in eagar
This is probably redundant. I don't think it's as easy to delete the main page as it used to be and if it did get deleted we would need to fix it anyway. The image is probably friendlier, but a waste of code for something that may never happen. diff ☸ Moilleadóir ☎ 16:43, 21 Bealtaine 2009 (UTC)
Remove anonnotice messages about Wikipedia cuir in eagar
Removed the second array. I assume we need to keep the rest for fundraising drives? diff ☸ Moilleadóir ☎ 16:52, 21 Bealtaine 2009 (UTC)
Remove Win IE 5.5 & 6 PNG transparency fix cuir in eagar
This is now included in the standard IEFixes.js. diff ☸ Moilleadóir ☎ 17:02, 21 Bealtaine 2009 (UTC)
If this ever needs to be added back, it should be done from MediaWiki:Common:_IE60_fixes.js. ☸ Moilleadóir ☎ 17:11, 21 Bealtaine 2009 (UTC)
Cookie helpers functions cuir in eagar
Moved these to the functions section. Used by custom preferences page and other code yet to be added. ☸ Moilleadóir ☎ 17:46, 21 Bealtaine 2009 (UTC)