Difference between revisions of "MediaWiki:Common.js"

From Documentation
m
Line 10: Line 10:
 
     "sampleText": ""}
 
     "sampleText": ""}
 
   }
 
   }
/* CharInsert */
 
 
var load_edittools = true;
 
 
importScript( 'MediaWiki:Edittools.js' );
 
 
if( wgAction == 'edit' || wgAction == 'submit' ) {
 
importScript( 'MediaWiki:Editpage.js' );
 
}
 
function includePage( name )
 
{
 
document.write('<script type="text/javascript" src="' + wgScript + '?title='
 
  + name
 
  + '&action=raw&ctype=text/javascript"><\/script>'
 
);
 
}
 
 
includePage( 'MediaWiki:Edittools.js' );
 

Revision as of 12:34, 14 February 2011

/* Any JavaScript here will be loaded for all users on every page load. */

 if (mwCustomEditButtons) {
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "/_w/images/7/79/Button_reflink.png",
     "speedTip": "Reference",
     "tagOpen": "<ref> ",
     "tagClose": " </ref>",
     "sampleText": ""}
  }