Iōng-chiá:Assassas77/common.js
Chù-ì: Pó-chûn liáu-āu, tio̍h ē-kì leh kā liû-lám-khì ê cache piàⁿ tiāu chiah khoàⁿ-ē-tio̍h kái-piàn: *Firefox / Safari: chhi̍h tiâu "Shift" kâng-sî-chūn tiám-kik Reload/têng-sin chài-ji̍p a̍h-sī chhi̍h Ctrl-F5 "Ctrl-R" kî-tiong chi̍t ê (Command-R tī Mac)
- Google Chrome: chhi̍h Ctrl-Shift-R (Command-Shift-R tī Mac)
Internet Explorer :chhi̍h tiâu "Ctrl" kâng-sî-chūn tiám-kek Refresh/têng-sin chài-ji̍p a̍h-sī chhi̍h "Ctrl-F5"
- Konqueror: tiám-kek Reload/têng-sin chài-ji̍p a̍h-sī chhi̍h F5
- Opera: piàⁿ-tiāu cache tī Tools(ke-si) → Preferences(siat-piān)
// <source lang="javascript">
var customizeToolbar = function () {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'chaozhou': {
'type': 'booklet',
'label': 'Swatow'
}
}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'chaozhou',
'pages': {
'emoticons': {
'layout': 'characters',
'label': 'Characters',
'characters': ['́', '̀', '̂', '̆', '̄', 'ⁿ', '̤' ,'<ref>{{SwatowFielde}}</ref>']
},
},
} );
};
/* 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 ([[phab:T54542#555387]])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
// </source>?