Jump to content

MediaWiki talk:Gadgets-definition/Archive 1

From Meta, a Wikimedia project coordination wiki
Latest comment: 1 year ago by TheresNoTime-WMF in topic addMe

Dear friends; please look at the links at user:i18n#useful links. Thanks in advance! Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 21:22, 6 February 2008 (UTC)

Disable Interlinker


disableInterlinkLogs = true;

Please make a way to disable MediaWiki:Common.js/interlinker.js by making it a gadget. Thanks. Kwj2772 (msg) 08:59, 1 November 2009 (UTC)

This is not an appropriate editprotected request for this page. This, that and the other 06:41, 21 February 2010 (UTC)

Proposal for GoogleTrans gadget

Hi there,

I have made a GoogleTrans gadget which has been on the enwiki for around a year now. It is also on 9 other wikis.

It functions like the Google toolbar translation feature. When you position the cursor over a word in a webpage and hit the SHIFT key, the Google translation of that word (or of selected text < 500 characters) appears in a popup below the cursor.

The help page for the gadget is at:


(This has instructions on how to port over to other wikis).

and the code for it is at:


It really works well for people who have intermediate command of a language as they can easily look up a word they don't know (every 2 or 3 sentences). This is how I use the tool to read French and Spanish webpages. However, the person who knows nothing of the language can simply select a sentence or two and have it translated as well. In each popup there is a link to Google Translation Services. If you click on this link then the whole page is translated.

Good luck with the wiki.

Endo999 18:14, 20 September 2010 (UTC)

Use rights tag

If you look at commons:MediaWiki:Gadgets-definition you'll see the gadgets in the "AuthorizedUsers" section have things like [rights=delete]. This hides the gadgets from users who don't have those rights. Perhaps someone could do this. Also, there are various changes afoot on Commons in preparation for changes to the ResourceLoader - someone should probably worry about that here... Rd232 06:28, 2 February 2012 (UTC)

The whole lot needs a thorough going over with a fine tooth comb. We should be looking to utilise master copies of scripts rather than all local copies. billinghurst sDrewth 23:45, 19 February 2012 (UTC)
That would be better, yes. It's already the case for some scripts, I think. Rd232 (talk) 23:59, 19 February 2012 (UTC)

porting over Teahouse Q&A gadget for new Grantmaking & Programs Evaluation portal

Hi folks, I'm porting the Teahouse Gadget over from en.wiki to be used in the Q&A forum of new the Grantmaking & Programs evaluation portal we're developing (project documentation here). As on en.wiki, the current plan is to implement the gadget on one page only (Programs:Evaluation_portal/Parlor/Questions), and to turn it on by default for all users.

We're using the gadget as opposed to a standard talk page for this forum because the Portal needs to be usable by a very broad audience, and some of our grant partners aren't experienced editors. The gadget seems to be more approachable for editors with a wide variety of experience levels than a standard talk page. The gadget was originally written in Februrary 2012 by Werdna based on my rough specs, and the code has since been improved by Kaldari, Writ Keeper, Equazcion and others to improve functionality and provide cross-browser compliance and graceful degradation. I have tested the gadget as a userscript (code, call, css) to ensure that it works as intended on meta. The code will live at: MediaWiki:Gadget-teahouse/content.js, MediaWiki:Gadget-teahouse.js, and MediaWiki:Gadget-teahouse.css Cheers, Jmorgan (WMF) (talk) 22:34, 27 September 2013 (UTC)

Esperanto Magical Conversion

For now I have removed the "eoMagicalConversion" gadget, as it seems to cause serious problems. I might try to fix the gadget, but I would appreciate input from others first (User:MZMcBride might be able to fix it...) PiRSquared17 (talk) 01:36, 12 November 2013 (UTC)

No idea. I didn't know such a gadget existed. What's it do? Where's it live? Who maintains it? --MZMcBride (talk) 03:51, 21 January 2014 (UTC)
Perhaps KuboF can answer that better than I can. It changes 'cx' to 'ĉ' (and similar for a few other characters). I'm not sure it's really needed. PiRSquared17 (talk) 04:00, 21 January 2014 (UTC)
@PiRSquared17 and MZMcBride: This gadget was useful in the time when Universal Language Selector wasn't enabled on all wikis. In ULS can users select the same function (Esperanto-x). I don't know who really maintain this gadget but i think it is no more needed. --KuboF (talk) 18:00, 21 January 2014 (UTC)
Similar (same?) gadget is also on hsb:MediaWiki:Gadget-EoMagicalConversion.js "maintained" by User:Tlustulimu and on commons:MediaWiki:Gadget-EoMagicalConversion.js. I know nothing more, maybe Brion VIBBER or Blahma know more. --KuboF (talk) 18:07, 21 January 2014 (UTC)

(un-indent) I believe ULS is now disabled here. --MZMcBride (talk) 18:44, 23 January 2014 (UTC)

It is, but why is it? PiRSquared17 (talk) 19:20, 23 January 2014 (UTC)

Last summer in Hong Kong, Amire80, when prompted by me, was going to remove this functionality completely (after checking that ULS works correctly for Esperanto). AFAIK it is not only a gadget, but there is even a legacy piece of code in MediaWiki written in the early 2000's by Brion Vibber which converts texts automatically if the language is set to Esperanto. If we can today do this on the user's side, all server processing is obviously obsolete. Hopefully, Amire80 would be able to finish the removal process, which he could not finish in Hong Kong? --Blahma (talk) 09:29, 31 January 2014 (UTC)

Thanks for mentioning this.
ULS was indeed disabled because of performance issues with webfonts. See mw:Universal Language Selector/Announcement Jan2014. Its developers (that includes myself) hope to re-enable it as soon as possible.
Blahma, I'm glad that there is demand for using it for typing Esperanto. I opened a bug to start tracking this work: bugzilla:60677. Can you please start a discussion about this in the Esperanto wikis to get more formal agreement? --Amir E. Aharoni (talk) 14:55, 31 January 2014 (UTC)

Add-me gadget for grantmaking pages

Hi all,

We’ve developed a gadget to make it easier for people to add themselves to projects, as part of a current worksprint on IdeaLab aimed at increasing participation from the broader community in ideas and grant proposals. The gadget’s present functionality enables a simple, structured workflow for endorsing ideas, learning patterns, and grant proposals. Later on, we plan to add a similar workflow to the gadget for people to join projects as participants.

The gadget is modeled after the Teahouse Gadget, now also used on meta for the questions page of the Learning & Evaluation Portal, which helps make interaction with wiki-pages easier for a broader audience while still maintaining wikimarkup for other uses. Making grantmaking more accessible for a wider pool of users is a key goal for these programs, hence the investment in some tools to help with this.

As has been done for the Teahouse gadget, the initial plan is to implement the gadget only on pages in the Grants namespace, and to turn it on by default for all users. We’ve built it in such a way that instances of this gadget could potentially be enabled for other community uses as well in the future - we hope this tool will make it easier to add more participants and community input to any projects where that would be helpful.

The gadget was written by Jeph paul based on specs generated by myself and Jonathan Morgan. We have tested the gadget as a userscript to ensure that it works as intended on meta. For more technical details, see the description and documentation pages. The code will live at: MediaWiki:Gadget-addMe/endorse.js, and MediaWiki:Gadget-addMe/endorse.css, and the localizable configuration files are here and here.

We’re aiming to enable this gadget next week (endorsement functionality only, and then we’ll post another update here later when the “join” functionality is ready to be added), so that we can start using it for IdeaLab, Learning Patterns, and Grant proposals immediately. You can check the gadget out on this test idea by clicking the “endorse” button in the infobox, after you have added importScript('MediaWiki:Gadget-addMe/endorse.js'); to your common.js page. Please test and share any feedback you have!

Cheers, Siko (WMF) (talk) 10:52, 15 May 2014 (UTC)


We’ve added in the join functionality as well now. The plan is to make the entire AddMe gadget live by end of this week. Relevant links:

Cheers, Siko (WMF) (talk) 19:32, 18 June 2014 (UTC)

Form wizard gadget for grantmaking pages

Hi all,

As part of the same sprint described above, we’ve now got a Form wizard ready for testing too. This gadget provides a simple structured workflow for creating ideas & grant proposals, again aimed at lowering barriers to entry for people starting these pages. An update to the gadget, coming later this month after we’ve confirmed v1 works well, will allow someone to add new sections to pages, making it easier to do things like take your Idea & turn it into an IEG proposal.

Like the Add-me gadget, the Forms wizard is built to be configurable so that anyone in the community can create a form for their own wiki-purposes. And also like the Add-me gadget, our current plan is to implement the gadget only on pages in the Grants namespace, and to turn it on by default for all users. We’re shooting to do this on Monday of next week.

Relevant links:

Feedback is, as always, very welcome :) Cheers, Siko (WMF) (talk) 23:11, 15 July 2014 (UTC)

The gadget is missing all its dependencies. Please add: |dependencies=mediawiki.api,mediawiki.cookie,mediawiki.ui,mediawiki.user,jquery.chosen,jquery.ui.dialog
-- [[User:Edokter]] {{talk}} 08:24, 12 May 2015 (UTC)
Edokter, we have fixed this. This multilingual version of the gadget has now undergone refactoring based on your review of the enwiki version. Cheers, Jmorgan (WMF) (talk) 16:51, 10 August 2015 (UTC)

migration to other RTL and multilanguage projects

m:wikt:yi:special:Gadgets m:wikt:yi:special:Preferences
m:commons:user:I18n m:wikt:yi:user:I18n w:yi:user:I18n

en: MediaWiki talk:Gadgets-definition special:Preferences
w: ar:, arc:, dv:, fa:, ha:, he:, ks:, ku:, lad:, pa:, ps:, sd:, tk:, ug:, ur:, yi:
others: test, m:, commons:, wm2008:, incubator:, beta.wikiversity:

  1. MediaWiki:Common.js
  2. special:Gadgets MediaWiki:Gadgets-definition talk
  3. MediaWiki:Gadget-section-General
    1. MediaWiki:Gadget-BiDiEditing MediaWiki:Gadget-BiDiEditing.js
  4. MediaWiki:Gadget-section-LanguageSupport and MediaWiki:Gadget-section-AdditionalRTLLanguageSupport
    1. MediaWiki:Gadget-UseLangArc MediaWiki:Gadget-UseLangArc.js
    2. MediaWiki:Gadget-UseLangAr MediaWiki:Gadget-UseLangAr.js
    3. MediaWiki:Gadget-UseLangDe MediaWiki:Gadget-UseLangDe.js
    4. MediaWiki:Gadget-UseLangDv MediaWiki:Gadget-UseLangDv.js
    5. MediaWiki:Gadget-UseLangEn MediaWiki:Gadget-UseLangEn.js
    6. MediaWiki:Gadget-UseLangEo MediaWiki:Gadget-UseLangEo.js
    7. MediaWiki:Gadget-UseLangEs MediaWiki:Gadget-UseLangEs.js
    8. MediaWiki:Gadget-UseLangFa MediaWiki:Gadget-UseLangFa.js
    9. MediaWiki:Gadget-UseLangFr MediaWiki:Gadget-UseLangFr.js
    10. MediaWiki:Gadget-UseLangHa MediaWiki:Gadget-UseLangHa.js
    11. MediaWiki:Gadget-UseLangHe MediaWiki:Gadget-UseLangHe.js
    12. MediaWiki:Gadget-UseLangKs MediaWiki:Gadget-UseLangKs.js
    13. MediaWiki:Gadget-UseLangKu MediaWiki:Gadget-UseLangKu.js
    14. MediaWiki:Gadget-UseLangLad MediaWiki:Gadget-UseLangLad.js
    15. MediaWiki:Gadget-UseLangPa MediaWiki:Gadget-UseLangPa.js
    16. MediaWiki:Gadget-UseLangPl MediaWiki:Gadget-UseLangPl.js
    17. MediaWiki:Gadget-UseLangPs MediaWiki:Gadget-UseLangPs.js
    18. MediaWiki:Gadget-UseLangRo MediaWiki:Gadget-UseLangRo.js
    19. MediaWiki:Gadget-UseLangRu MediaWiki:Gadget-UseLangRu.js
    20. MediaWiki:Gadget-UseLangSd MediaWiki:Gadget-UseLangSd.js
    21. MediaWiki:Gadget-UseLangTg MediaWiki:Gadget-UseLangTg.js
    22. MediaWiki:Gadget-UseLangTk MediaWiki:Gadget-UseLangTk.js
    23. MediaWiki:Gadget-UseLangYi MediaWiki:Gadget-UseLangYi.js
    24. MediaWiki:Gadget-UseLangUg MediaWiki:Gadget-UseLangUg.js
    25. MediaWiki:Gadget-UseLangUr MediaWiki:Gadget-UseLangUr.js

under test

  1. MediaWiki:Gadget-section-TestMode
  2. MediaWiki:Gadget-QuickEdit MediaWiki:Gadget-QuickEdit.js
  3. MediaWiki:Gadget-EoMagicalConversion MediaWiki:Gadget-EoMagicalConversion.js
  1. MediaWiki:Gadget-ShortDiff MediaWiki:Gadget-ShortDiff.js
  2. MediaWiki:Gadget-ShortLink MediaWiki:Gadget-ShortLink.js
  3. MediaWiki:Gadget-Purge-tab MediaWiki:Gadget-Purge-tab.js
  4. MediaWiki:Gadget-CSS-tab MediaWiki:Gadget-CSS-tab.js‎
  5. MediaWiki:Gadget-XHTML-tab MediaWiki:Gadget-XHTML-tab.js


  1. MediaWiki:Gadget-UseLang MediaWiki:Gadget-UseLang.js

Signature for archival. --14:46, 1 May 2017 (UTC)

I've just boldly added the gadget and made it default because it's quite useful in a number of cases, for readers even more than for users (social media and friends like shorter urls). But feel free to disagree, I'd remove it start a discussion in this case.

MoreMenu gadget

Hello! I'd like to propose adding the MoreMenu gadget to Meta. If there is better way to propose gadgets please enlighten me :)

For Vector users, MoreMenu adds up to two dropdown menus ("Page" and "User") containing links to relevant logs, uploads, external tools, and admin/checkuser/oversight/steward functions. There is an older script designed for Monobook but I'm not sure how well it would work here on Meta.

I feel this would be a nifty tool for many users, especially admins and stewards. If you'd like to test it out, you can add the following your vector.js:


The source of the gadget itself would the same, loading it from the English Wikipedia, that way you get all the updates.

Assuming the script will live at MediaWiki:Gadget-MoreMenu.js, the gadget definition would be along the lines of:

* MoreMenu[ResourceLoader|skins=vector|dependencies=mediawiki.api,mediawiki.util,user.options]|MoreMenu.js

And the description could be something like:

[[en:WP:MOREMENU|MoreMenu]]: add Page and User dropdown menus to the toolbar with links to common tasks, analytic tools and logs (Vector skin only)

linking to the documentation at en:WP:MOREMENU. If you think it is better, I could copy the documentation to Meta, as MoreMenu is also used on at least one other wiki.

Thanks for your consideration — MusikAnimal talk 02:24, 18 April 2017 (UTC)

Hi, I've started a discussion at Babel to treat this request. Regards.--Syum90 (talk) 09:02, 21 April 2017 (UTC)
@MusikAnimal: Hi, as there have been no objections I've added the gadget. I suggest you to replace the "Wikipedia:" links in the gadget's source per "Project:" in order to make this gadget more useful here at Meta as well as in other projects not being wikipedias. Regards.--Syum90 (talk) 11:24, 29 April 2017 (UTC)
@Syum90: Thanks! I have added metawiki support for "Requests for ..." pages, per your suggestion. E.g. try your own userpage and you should see "User" > "RfXs..." > "RfAs". Similarly you'll see links for Requests for bureaucratship, translation adminship, etc., if applicable. Best — MusikAnimal talk 18:28, 30 April 2017 (UTC)
@Syum90: I have migrated the documentation to Meta. Could you update the link in MediaWiki:Gadget-MoreMenu to point to MoreMenu? Thanks! — MusikAnimal talk 22:30, 30 April 2017 (UTC)
Done 01:18, 1 May 2017 (UTC)

Dependencies for MediaWiki:Gadget-CurIDLink.js

The gadget MediaWiki:Gadget-CurIDLink.js fails with TypeError: mw.util is undefined. The dependency to module mediawiki.util is missing:

* CurIDLink[ResourceLoader|default|dependencies=mediawiki.util]|CurIDLink.js

--Fomafix (talk) 12:46, 1 May 2017 (UTC)

It worked for me (perhaps cache), but fixed. Is it better? --Base (talk) 13:04, 1 May 2017 (UTC)

{{editprotected}} Please, do the same thing for markBlocked:


Matěj Suchánek (talk) 08:44, 3 May 2017 (UTC)

Done, thanks. —MarcoAurelio 10:49, 3 May 2017 (UTC)

i18n for gadgets

I am currently working on a gadget in my user space as part of an upcoming re-design of the Wikimedia Resource Center. At the moment, the gadget uses hardcoded English strings. However, I would like for the gadget's interface to be translated into other languages. What are some best practices for implementing i18n in gadgets? Do people use the MediaWiki namespace for this, or something else? Thank you, Harej (WMF) (talk) 03:25, 15 June 2017 (UTC)

Resource Center gadget

Hello everyone. As part of my work re-designing the Wikimedia Resource Center I have developed a gadget to make it easier to add and edit individual entries, comparable to the AddMe gadget. It is currently an opt-in gadget while it is being tested. I would like to eventually make this an on-by-default gadget, but even then it should not affect any pages outside of the few pages it is meant to be used on. Please let me know if you have any questions. Thanks, Harej (WMF) (talk) 21:42, 15 June 2017 (UTC)

An update: testing is going well. I will be turning this on as a default gadget on 6 July 2017. In the meantime, please let me know if you identify any issues. Thanks, Harej (WMF) (talk) 17:14, 30 June 2017 (UTC)
I have now made the gadgets on by default. Please let me know immediately if there are any problems. Harej (WMF) (talk) 22:53, 6 July 2017 (UTC)

Maintenance of Meta-Wiki gadgets

Please see Meta:Babel#Maintenance_of_Meta-Wiki_Gadgets. Thank you, —MarcoAurelio (talk) 11:01, 10 August 2017 (UTC)

XTools ArticleInfo gadget

Hello! The XTools team is happy to announce the revival of the popular XTools gadget. Before this was offered as a user script, but now we'd like to propose it as a proper gadget here on Meta. The gadget works for all skins and will be shown in your language (assuming translations exist). Here's a screenshot:

The XTools ArticleInfo gadget, as seen when viewing the English Wikipedia article on Jimmy Wales.

Documentation can be found at mw:XTools#ArticleInfo gadget. The gadget along with all of XTools is meant to work on non-WMF wikis, too, hence why the documentation lives there and not on Meta.

If you'd like to try it out now, add the following to your common.js (or global.js):


If we'd like to move forward with enabling it as a gadget here on Meta, please create it at MediaWiki:Gadget-XTools-ArticleInfo.js with the same code above. This loads it from mw:XTools/ArticleInfo.js so that updates are automatically applied. The source page is fully protected to prevent disruption.

The gadget definition (probably placed under "interface") should be along the lines of:

* XTools-ArticleInfo[ResourceLoader]|XTools-ArticleInfo.js

and the description at MediaWiki:Gadget-XTools-ArticleInfo could be (feel free to copy edit):

[[mw:XTools|XTools]]: Dynamically show statistics about a page's history under the page heading.

I am going to post a note at Meta:Babel about this as well. Thank you for your consideration! — MusikAnimal talk 17:52, 23 August 2017 (UTC)

+1 for gadget. Visible metadata ftw. :) Quiddity (talk) 08:59, 24 August 2017 (UTC)
+1 for me as well as optional gadget for those willing to use it. —MarcoAurelio (talk) 10:08, 25 August 2017 (UTC)
Done. —MarcoAurelio (talk) 16:38, 27 August 2017 (UTC)
Thanks! @MarcoAurelio: Could you also update User:Hedonil/XTools/XTools.js to the same code as MediaWiki:Gadget-XTools-ArticleInfo.js? There are still a lot of people sourcing Hedonil's user script, which will die once the old XTools is retired. Best — MusikAnimal talk 16:40, 29 August 2017 (UTC)

Hello. Please see Meta:Babel#Direct-link-to-Commons, if jquery.mwExtension could be removed? Rehman 04:24, 9 September 2020 (UTC)

This proposed edit is correct, see w:Special:Diff/668285663/918073275. PiRSquared17 (talk) 04:52, 9 September 2020 (UTC)

Done @Rehman: please confirm that it works for you.  — billinghurst sDrewth 00:36, 10 September 2020 (UTC)

Billinghurst. Works perfectly. Many thanks! Rehman 03:19, 10 September 2020 (UTC)

Please remove "Dynamic menus"

I made the gadget "Dynamic menus" for the Modern skin back in 2008. The gadget has not be updated or maintained since then – I just tested it, and the main functionality still works pretty well (to my surprise), but given the fact that the Modern skin is not even available in Special:Preferences any more (except through hacky backroads), it is best to remove it from here altogether. The CSS page (MediaWiki:Gadget-dynamic-menus.css) could also be moved back to a subpage of mine (e.g. User:Jon Harald Søby/gadget-dynamic-menus.css) so it isn't mistaken for active gadget code. Jon Harald Søby (talk) 12:21, 24 November 2022 (UTC)

Donexaosflux Talk 14:15, 25 November 2022 (UTC)


Could an IA please remove the default property from the addMe gadget? I believe it is conflicting with addMe-v2 and preventing the currently running wishlist's "Support" buttons from working (I also posted this request at xaosflux's talk page, just in case its already been done by the time someone sees this) — TheresNoTime-WMF (talk • they/them) 18:28, 10 February 2023 (UTC)

CC MusikAnimal (WMF)TheresNoTime-WMF (talk • they/them) 18:29, 10 February 2023 (UTC)