Difference between revisions of "MediaWiki:Common.js"

From ADF Docs
Jump to: navigation, search
(Created page with 'Any JavaScript here will be loaded for all users on every page load.: // this javascript code adds a few buttons in the mediawiki editor to make editing easier if (mwCustomE…')
 
(No difference)

Latest revision as of 00:21, 4 August 2010

/* Any JavaScript here will be loaded for all users on every page load. */
// this javascript code adds a few buttons in the mediawiki editor to make editing easier
if (mwCustomEditButtons) {
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png",
    "speedTip": "Comment visible only for editors",
    "tagOpen": "",
    "sampleText": "Insert comment here"}
 mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png",
    "speedTip": "Redirect",
    "tagOpen": "#REDIRECT [[",
    "tagClose": "]]",
    "sampleText": "Insert text"};
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images.wikia.com/central/images/c/c9/Button_strike.png",
    "speedTip": "Strike",
    "tagOpen": "",
    "tagClose": "",
    "sampleText": "Strike-through text"};
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images.wikia.com/central/images/1/13/Button_enter.png",
    "speedTip": "Line break",
    "tagOpen": "
",
    "tagClose": "",
    "sampleText": ""};
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images2.wikia.nocookie.net/central/images/1/1c/Button_advanced_image.png",
    "speedTip": "Flickr Image",
    "tagOpen": "<flickr>",
    "tagClose": "|frame|none|-|Picture</flickr>",
    "sampleText": "10-digits"};
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://images3.wikia.nocookie.net/central/images/2/29/Button_user.png",
    "speedTip": "Add author bar",
    "tagOpen": '{|class="MainPageBG" cellpadding="2" cellspacing="5" style="width:100%; vertical-align:top; border:1px solid #afa3bf; background-color:#ddcef2; color:#000; font-size:100%;"\n! This article has been written by'+" [[",
    "tagClose": "]]\n|}",
    "sampleText": "Your name"};
}