Toggle menu
24K
665
183
158.2K
HausaDictionary.com | Hausa English Translations
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User:Admin/common.js: Difference between revisions

From HausaDictionary.com | Hausa English Translations
No edit summary
Undo revision 159523 by Admin (talk)
Tag: Undo
 
(3 intermediate revisions by the same user not shown)
Line 164: Line 164:
label: 'Feminine Gender',
label: 'Feminine Gender',
type: 'button',
type: 'button',
                         icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/66/Venus_symbol.svg/50px-Venus_symbol.svg.png',
                         icon: '//hausadictionary.com/images/9/97/femalebutton_23x23.png',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',

Latest revision as of 12:38, 4 February 2024

var customizeToolbar = function() {
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"strikethrough": {
			label: 'Strike',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/3/30/Btn_toolbar_rayer.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<s>",
					post: "</s>"
				}
			}
		}
	}
});

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Horizontal line',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/0/0d/Button_hr.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "----",
					ownline: true
				}
			}
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Special Hausa Letters',
			type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/b/b7/Implosive_b.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "Ɓɓ",
					ownline: false
				}
			}
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Special Hausa Letters',
			type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/RomanD-01.png/25px-RomanD-01.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "Ɗɗ",
					ownline: false
				}
			}
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Special Hausa Letters',
			type: 'button',
                        icon: '//hausadictionary.com/images/e/ef/%C6%98.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "Ƙ",
					ownline: false
				}
			}
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Special Hausa Letters',
			type: 'button',
                        icon: '//hausadictionary.com/images/8/86/%C6%99_.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "ƙ",
					ownline: false
				}
			}
		}
	}
} );



$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'HTML Image',
			type: 'button',
                        icon: '//hausafilms.tv/lib/images/toolbar/image.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<html><img align=right src=\"FILE\"/></html>\[\[Category\:TODO\]\]\[\[Category\:GlosbeTODOen\]\]",
					ownline: true
				}
			}
		}
	}
} );


$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Masculine Gender',
			type: 'button',
                        icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Mars_symbol.svg/50px-Mars_symbol.svg.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<abbr title=\"masculine gender\">''m''</abbr>[[Category:Masculine gender Hausa nouns]]",
					ownline: false
				}
			}
		}
	}
} );



$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"hline": {
			label: 'Feminine Gender',
			type: 'button',
                        icon: '//hausadictionary.com/images/9/97/femalebutton_23x23.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<abbr title=\"feminine gender\">''f''</abbr>[[Category:Feminine gender Hausa nouns]]",
					ownline: false
				}
			}
		}
	}
} );


};



/* 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 () {
		// 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.toolbar' ), $.ready
			).then( customizeToolbar );
		}
	} );
}
// Add the customizations to LiquidThreads' edit toolbar, if available
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );