Edit tools

Jump to navigation Jump to search

Edit tools

Also curious: do you have a better Javascript function for modifying EditTools than Conrad.Irwin's? I'm finding his quite irritating, since it creates a second drop-down menu and messes up the first, and I happened upon your IPA edittools page while searching to see if there was an improved version available.

Eru·tuon21:49, 7 April 2016

I don't have anything better, sorry.

CodeCat21:54, 7 April 2016
 

That's annoyed me for a while now, but I thought it was just me. Time allowing, I'll take a look at the code -- I suspect something in MediaWiki has changed in the years since the EditTools code was written, resulting in the aberrant behavior.

‑‑ Eiríkr Útlendi │Tala við mig23:15, 7 April 2016

I'd be delighted if you found how to fix it. (I can't view the source myself, not being an admin.) I think one thing that changed was they added edittools- to the id of various menu elements.

Eru·tuon22:32, 8 April 2016

Due to changes in the Wiktionary infrastructure, Conrad's old script has essentially gotten out of sync with the rest of the site. It turns out that Conrad's script wasn't adding the edittools- prefix, but instead was failing to remove it.

Try pointing to https://en.wiktionary.org/wiki/User:Eirikr/edittools.js instead -- I copied Conrad's code and tweaked the copy. It seems to be working for me.

Question: This currently just puts the user's custom sections at the top of the menu, but it doesn't change the names of these sections at all. This could be confusing, if a user section has the same title as an existing default MediaWiki edittools section. Should we add a prefix to the user sections?

‑‑ Eiríkr Útlendi │Tala við mig08:49, 9 April 2016

Your code works for me too.

I like to be able to choose a section by clicking the menu and typing a letter or two letters. Adding a prefix would make this harder (for instance, I couldn't type "i" to select an custom IPA menu). So I would prefer not having a prefix. Perhaps a suffix, if the menu has the same name.

I wonder if the Wiktionary version of the edit tools could be modified to be more like Wikipedia. Wikipedia uses and MediaWiki:Gadget-charinsert-core.js (or MediaWiki:Edittools for users without Javascript) and MediaWiki:Gadget-charinsert.js, which make the syntax for customization (added to common.js) much simpler. Customization can either add more characters to the end of the default menus, or create new menus.

However, I do like the fact that Wiktionary lets you insert lang= and class= to make the characters in the menu display better. Not sure if that functionality could be added to the Wikipedia code, and it's essential on Wiktionary.

Eru·tuon21:18, 9 April 2016