MediaWiki talk:Common.js

Add topic
From Wikimedia Incubator
Latest comment: 10 years ago by Yair rand in topic commons:MediaWiki:AnonymousI18N.js

Small things[edit source]

  • Most ta[] are unnecessary since tooltips and access key are now defined by Mediawiki. Disable Javascript in your browser, compare all the tooltips and then leave only those ta[] which are supposed to be different (because it's Incubator or simply because you don't like the original wording)
  • (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) now can be simplified to (wgAction == 'edit' || wgAction == 'submit')
  • The /* <pre> */ part is totally obsolete

Alex Smotrov 19:49, 10 August 2007 (UTC)Reply

Done SPQRobin 20:38, 10 August 2007 (UTC)Reply

Error because of missing Upload link[edit source]

I'm not sure why I don't have «Upload» link (not enough edits or it was simply removed for everyone), but the code

function upload2dp()
{
   document.getElementById("t-upload").firstChild.href = "/wiki/Incubator:Upload";
}
addOnloadHook(upload2dp);

results in error. Please either remove it or add an additional check. Thank you ∴ Alex Smotrov 15:35, 11 September 2007 (UTC)Reply

Uploading is disabled, you need to upload at commons. -Markvondeegel 16:41, 11 September 2007 (UTC)Reply
@ Alex: I don't know why it doesn't works, I copied it from [1], and there it works. SPQRobin 13:11, 12 September 2007 (UTC)Reply
On nl.wp the upload link is present, so there is no error. I suspect that at some point someone requested the devs to remove the upload link entirely (Do you see the upload link on the left?) Then the code above is simply not required anymore and should be removed ∴ Alex Smotrov 15:02, 13 September 2007 (UTC)Reply
I am going to try something with CSS and other JavaScript. I hope it works. SPQRobin 15:29, 13 September 2007 (UTC)Reply
It didn't work. I've removed everything. SPQRobin 15:54, 13 September 2007 (UTC)Reply
Oh, I get it. When I requested to disable uploads, I think they have also removed the link. SPQRobin 15:58, 13 September 2007 (UTC)Reply

AJAX SiteNotice[edit source]

Hello, please remove the AJAX SiteNotice. It is no longer needed because the CentralNotice has been fixed to not hide the site notice. You may notice the site notice appears twice now. —Pathoschild 21:43:13, 16 November 2007 (UTC)

As reported via IRC, Done Cbrown1023 talk 00:03, 17 November 2007 (UTC)Reply

commons:MediaWiki:AnonymousI18N.js[edit source]

commons:MediaWiki:AnonymousI18N.js is breaking the JS for all logged-out users. I recommend removing the section that imports it from the JS until this is fixed. --Yair rand (talk) 03:39, 5 August 2013 (UTC)Reply

How does it break? Only on Incubator or also on Commons (and Wikidata uses it as well I think)? --MF-W {a, b} 15:31, 5 August 2013 (UTC)Reply
Commons and Wikidata don't appear to have the problem. The breaking line is if (wpAvailableLanguages.en === 'English') { . It seems that wpAvailableLanguages is not getting defined. --Yair rand (talk) 15:42, 5 August 2013 (UTC)Reply
I've copied the settings from commons' common.js. Hopefully that fixes it. --MF-W {a, b} 16:32, 5 August 2013 (UTC)Reply
Seems to be fixed. Thanks. --Yair rand (talk) 17:07, 5 August 2013 (UTC)Reply