Category talk:JavaScript

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Wikimedia JavaScripts synchronisation[edit]

I tried to inventory all our relevant JavaScripts for Wiktionaries, however we would need to list them all, and every Wiki seems to be an hermetic cell: even when someone warn them in their own language in each village pump, sometimes it works (1, 2), and sometimes not (3, 4).

Moreover, on the Wiktionary in French we've voted for but didn't complete to install these two JavaScripts for many months, even after having contacted the authors:

  1. wikt:en:User:Conrad.Irwin/editor.js
  2. wikt:en:User:Hippietrail/nearbypages.js
  3. wikt:en:User:Connel MacKenzie/keypad.js

Apart from that, another example is: how can we simply add some links in the vector sidebar, like this, or that? I couldn't do at least one of them in less than one hour.

Consequently we would need a repository (here?) to allow the easy browsing and installations. JackPotte 13:38, 28 August 2010 (UTC)

note, If you just want to add a link to the sidebar, you use addPortletLink, which is part of wikibits.js. Syntax is addPortletLink(portlet, href, text, id, tooltip, accesskey, nextnode) with not all arguments neccesary. For example
addOnloadHook(function() { addPortletLink('p-tb', 'http://example.com/some_url', 'Text of link', 'text on hover  (tooltip)');});

The first argument is which section of the sidebar to use. Generally its 'p-name_of_section'. 'p-tb' means the toolbox (and is generally an exception to the naming standard), 'p-navigation' is the navigation section, etc. You've also got 'p-namespaces', 'p-views', 'p-cactions', and 'p-personal' for the stuff at the top (be careful though, adding stuff at the top might vary with skin, or at least it used to). As a note, js for wikis developed outside of core mediawiki js tend to have lots of dependencies and make assumptions not true on sites other than what its designed for, which is why they often don't work. Bawolff 20:09, 8 September 2010 (UTC)

Thanks for wikt:fr:MediaWiki:Gadget-keypad.js. JackPotte 20:41, 9 September 2010 (UTC)
I've called the author of the last one, but he never had the time. JackPotte 12:41, 11 September 2010 (UTC)