User:Pamputt/biloxi.js
Appearance
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Cmd-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (Cmd-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
For details and instructions about other browsers, see Wikipedia:Bypass your cache.
Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the central discussion page, Scriptorium. The code will be executed when previewing this page under some skins, including Monobook. You can in the interim if you wish to refresh the content sooner under another skin. |
Documentation for this user script can be added at User:Pamputt/biloxi. |
// This gadget adds a list of characters used in Biloxi and Ofo languages
// to the vector toolbar
// List of the characters
var caracteres_liste_biloxi = ["ˊ","ạ","ā",,"ĕ","ĭ","ḳ","ᵐ","ñ","ⁿ","ṭ","x̣"] ;
// Adding the section "Caractères en biloxi/ofo"
var barre_caract_perso = function() {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'caracteres': {
label:'Caractères en biloxi/ofo',
type:'booklet',
deferLoad:true,
pages: {
'Biloxi': {
'label':'Biloxi',
'layout':'characters',
'characters': caracteres_liste_biloxi
}
}
}
}
} );
};
// Checking that the view is in modification mode et that the required modules are available.
// Then, modifying the toolbar
if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
mw.loader.using( 'user.options', function () {
if ( mw.user.options.get('usebetatoolbar') ) {
mw.loader.using( 'ext.wikiEditor', function () {
$(document).ready( barre_caract_perso );
} );
}
} );
}