User:Assassas77/teochew.js

//  var customizeToolbar = function { $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {	'sections': {		'chaozhou': {			'type': 'booklet',			'label': 'Swatow'		}	} } ); $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {	'section': 'chaozhou',	'pages': {		'emoticons': {			'layout': 'characters',			'label': 'Characters',			'characters': ['⿰','⿱','⿲','⿳','⿴','⿵','⿶','⿷','⿸','⿹','⿺','⿻',,' [sic]',,			' \n\n — * —',' ',' ',,			,'́', '̀', '̂', '̆', '̄', 'ⁿ','̤','','̃','̚','ʰ','̌','͘','̍','̩']		},	}, } ); };

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */ if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) { mw.loader.using( 'user.options' ).then( function {		// This can be the string "0" if the user disabled the preference (T54542)		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {			$.when( mw.loader.using( 'ext.wikiEditor' ), $.ready ).then( customizeToolbar );		}	} ); }

/********************** * auteur : Zaran **********************/

function showPanel(animated) { var skin = mw.config.get('skin'); var content = $('#content'); if ( skin == 'vector' ) { if ( animated) { content.animate({'margin-left':content.data('margin')},function{$("#mw-panel").show;}); $("#left-navigation").animate({'left': content.data('margin')}); }   else { content.css('margin-left', content.data('margin') ); $("#mw-panel").show; $("#left-navigation").css('left', content.data('margin') ); } }  else if ( skin == 'monobook' ) { if ( animated) { content.animate({'margin-left':content.data('margin')}, function {content.css('z-index', '2');}); }   else { content.css('margin-left', content.data('margin') ); content.css('z-index', '2'); } } } function hidePanel(animated) { var skin = mw.config.get('skin'); var content = $('#content'); if ( skin == 'vector' ) { $("#mw-panel").hide; if ( animated ) { content.animate({'margin-left':'0px'}); $("#left-navigation").animate({'left':'0px'}); }   else { content.css('margin-left', '0px'); $("#left-navigation").css('left', '0px'); } }  else if ( skin == 'monobook' ) { content.css('z-index', '4'); if ( animated ) { content.animate({'margin-left':'0px'}); }   else { content.css('margin-left', '0px'); } } } function hidePanelCookie(animated) { hidePanel(animated); $("#panel-collapse").find("a").text("Afficher"); $("#panel-collapse").find("a").off("click"); $("#panel-collapse").find("a").click( function( e ) {   e.preventDefault;    showPanelCookie(true);  }); mw.cookie.set("hidepanel", "true"); } function showPanelCookie(animated) { showPanel(animated); $("#panel-collapse").find("a").text("Masquer"); $("#panel-collapse").find("a").off("click"); $("#panel-collapse").find("a").click( function( e ) {   e.preventDefault;    hidePanelCookie(true);  }); mw.cookie.set("hidepanel", "false"); } $(function { mw.loader.using(['mediawiki.util', 'mediawiki.cookie'], function { var content = $('#content'); content.data('margin', content.css('margin-left')); var collapseLink = mw.util.addPortletLink( "p-personal", "#" , "Masquer", "panel-collapse", "Afficher/Masquer le menu latéral", "", "#pt-userpage"); var hide = mw.cookie.get("hidepanel"); if ( hide == "true") { hidePanelCookie(false); } else { $("#panel-collapse").find("a").click( function( e ) {     e.preventDefault;      hidePanelCookie(true);    }); } }); });