User:Pamputt/biloxi.js

From Wikisource
Jump to navigation Jump to search
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.

// 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 );
                        } );
                }
        } );
}