Jump to content

MediaWiki:Gadget-Edittools.js/documentation

From Wiktionary, the free dictionary

A registered user can add custom menus by putting code like the following in Special:MyPage/common.js:

mw.loader.using(['mediawiki.cookie', 'jquery.textSelection']).done(function() {
    mw.hook('enwiktionary.edittools.addCategory').fire([
        {name: 'Polabian', html: '<span class="charinsert">A a Ă ă Å å Ą ą B b B́ b́ C c Ć ć Č č D d Ď ď Ʒ ʒ Ʒ́ ʒ́ E e Ė ė Ĕ ĕ F f G g Ǵ ǵ H h Χ χ Χ́ χ́ I i J j K k Ḱ ḱ L l Ľ ľ M m Ḿ ḿ N n Ń ń O o Ö ö Ǫ ǫ P p Ṕ ṕ R r Ŕ ŕ S s Ś ś Š š T t Ť ť U u Ü ü V v V́ v́ Z z Ź ź Ž ž ai̯ au̯ åi̯ åu̯ oi̯ üi̯</span>'},
        { name: 'Slovincian', insertBefore: 'Polabian', html: '...' }
    ]);
});

insertBefore provides the name of the menu to place the new menu before. Omit insertBefore to put the menu at the end of the dropdown list.