Difference between revisions of "MediaWiki:Common.js"

From Documentation
Line 13: Line 13:
  
 
var load_edittools = true;
 
var load_edittools = true;
// extra drop down menu on editing for adding special characters
+
 
 
importScript( 'MediaWiki:Edittools.js' );
 
importScript( 'MediaWiki:Edittools.js' );
// Editpage scripts
+
 
 
if( wgAction == 'edit' || wgAction == 'submit' ) {
 
if( wgAction == 'edit' || wgAction == 'submit' ) {
 
importScript( 'MediaWiki:Editpage.js' );
 
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": ""}
  }
/* 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' );