MediaWiki:Common.js

From Wikiquote

Jump to: navigation, search

Note - After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh); Konqueror: click Reload or press F5; Opera: clear the cache in Tools → Preferences; Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

 /* Any JavaScript here will be loaded for all users on every page load. */
 
//Adds a dismissable notice to Special:Watchlist
//Useful to use instead of the sitenotice for messages only
//relevant to registered users.
if( wgCanonicalSpecialPageName == "Watchlist" ) importScript( 'MediaWiki:Common.js/WatchlistNotice.js' );
 
 
 /** Extra toolbar options ****************************************************** <nowiki>
  *
  *  Description: Adds additional buttons and their functions to edit-window toolbar
  *  Maintainers: [[User:Cbrown1023]], [[User:Jeffq]]
  */
 
 //This is a modified copy of a script by User:MarkS on the English Wikipedia for extra features added by User:Voice of All.
 // This is based on the original code on Wikipedia:Tools/Editing tools
 // To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]]
 
 if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png",
     "speedTip": "Redirect",
     "tagOpen": "#REDIRECT [[",
     "tagClose": "]]",
     "sampleText": "Insert text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
     "speedTip": "Strike",
     "tagOpen": "<s>",
     "tagClose": "</s>",
     "sampleText": "Strike-through text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
     "speedTip": "Line break",
     "tagOpen": "<br />",
     "tagClose": "",
     "sampleText": ""};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png",
     "speedTip": "Small",
     "tagOpen": "<small>",
     "tagClose": "</small>",
     "sampleText": "Small Text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png",
     "speedTip": "Insert hidden Comment",
     "tagOpen": "<!-- ",
     "tagClose": " -->",
     "sampleText": "Comment"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png",
     "speedTip": "Insert block of quoted text",
     "tagOpen": "<blockquote>\n",
     "tagClose": "\n</blockquote>",
     "sampleText": "Block quote"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/41/Button_hr_halfwidth.png",
     "speedTip": "Insert a half-width horizontal line (used in between dialogues)",
     "tagOpen": '<hr width="50%"/>',
     "tagClose": "",
     "sampleText": ""};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/49/Button_talk.png",
     "speedTip": "Insert a dialogue speaker",
     "tagOpen": ":'''",
     "tagClose": "''':",
     "sampleText": "Insert speaker's name"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = { 
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c1/Button_city_silhouette.png",
     "speedTip": "Insert a scene description (use before a dialogue segment)",
     "tagOpen": ":''[",
     "tagClose": "]''",
     "sampleText": "Insert the scene's context"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/ec/Button_base.png",
     "speedTip": "Insert a stage direction",
     "tagOpen": "''[",
     "tagClose": "]''",
     "sampleText": "Insert a stage direction"};
 
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/cb/Button_wikipedia.png",
    "speedTip": "Insert a link to Wikipedia",
    "tagOpen": "[[w:",
    "tagClose": "|]]",
    "sampleText": "Insert Wikipedia pagename"};
}
 /*</nowiki>*/