Autochecked users, Bureaucrats, Editors, oversight, recentchangescleanup, Reviewers, rollback, Administrators
19,746
edits
(-) |
No edit summary |
||
Line 3: | Line 3: | ||
* @stats [[File:Krinkle_InsertWikiEditorButton.js]] | * @stats [[File:Krinkle_InsertWikiEditorButton.js]] | ||
*/ | */ | ||
var customizeToolbar = function() { | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
'sections': { | |||
'emoticons': { | |||
'type': 'toolbar', // Can also be 'booklet' | |||
'label': 'Emoticons' | |||
// or 'labelMsg': 'section-emoticons-label' for a localized label | |||
} | |||
} | |||
} ); | |||
}; | |||
/* 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', function () { | |||
if ( mw.user.options.get('usebetatoolbar') ) { | |||
mw.loader.using( 'ext.wikiEditor.toolbar', function () { | |||
$(document).ready( customizeToolbar ); | |||
} ); | |||
} | |||
} ); | |||
} | |||
// Add the customizations to LiquidThreads' edit toolbar, if available | |||
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar ); | |||
jQuery.getScript('//www.wikiislam.net/w/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript', function () { | jQuery.getScript('//www.wikiislam.net/w/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript', function () { | ||
Line 198: | Line 226: | ||
/* | /* | ||
// ---------------- | |||
// Begin: OLD Edit toolbar code | |||
// ---------------- | |||
if (mwCustomEditButtons) { | if (mwCustomEditButtons) { | ||
buttomimagepath = "http://www.wikiislam.net/wiki/uploads/" | buttomimagepath = "http://www.wikiislam.net/wiki/uploads/" | ||
Line 349: | Line 380: | ||
} | } | ||
// END: OLD Edit Toolbar code | |||
*/ | */ | ||
edits