MediaWiki:Wikia.js

/** Add new buttons to the Source Editor toolbar **/

if (mwCustomEditButtons.length) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Add redirect", "tagOpen": "#REDIRECT [" + "[", "tagClose": "]]", "sampleText": "Insert text" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/c/c9/Button_strike.png", "speedTip": "Strike through text", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/1/13/Button_enter.png", "speedTip": "Line break", "tagOpen": " ", "tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/7/74/Button_comment.png", "speedTip": "Add text only visible in the Source Editor", "tagOpen": "", "sampleText": "Insert comment here" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/f/fd/Button_underline.png", "speedTip": "Underline text", "tagOpen": " ", "tagClose": " ", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/4/43/Button-template.png", "speedTip": "Add template tags", "tagOpen": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/2/28/Button_wikilink.png", "speedTip": "Add link to category or file page", "tagOpen": "",	"tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/c/cb/Button_wikipedia.png", "speedTip": "Quick link to Wikipedia", "tagOpen": "wikipedia:",	"tagClose": "", "sampleText": "" };	mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "//images.wikia.com/central/images/3/3c/Button_pre.png", "speedTip": "Show literal content in gray box and code font", "tagOpen": " ", "tagClose": " ", "sampleText": "" }; }

/** Adds a Block button to button dropdown on messages ~ By Sophiedp **/ if (wgNamespaceNumber === 1201 &&    mw.config.get("wgUserGroups").indexOf('sysop') > -1) { for (var i in $('.msg-toolbar')) { var user = $('.msg-toolbar:eq(' + i + ')').parent .find('.edited-by a').text; $('.msg-toolbar:eq(' + i + ')').find('.WikiaMenuElement li') .last.before(               'Block'            ); }}