Difference between revisions of "MediaWiki:Common.js"

From Learning Languages Through Video Games
Jump to navigationJump to search
(Created page with "function includePage( name ) { document.write('<script type="text/javascript" src="' + wgScript + '?title=' + name + '&action=raw&ctype=text/javascript"><\/script>' ); } ...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
/*** BEGIN EDITTOOLS ***/
 
function includePage( name )
 
function includePage( name )
 
{
 
{
Line 15: Line 16:
 
// extra drop down menu on editing for adding special characters
 
// extra drop down menu on editing for adding special characters
 
includePage( 'MediaWiki:Edittools.js' );
 
includePage( 'MediaWiki:Edittools.js' );
 +
/*** END EDITTOOLS ***/
 +
 +
 +
addOnloadHook(function() {
 +
    // Hide stuff that's supposed to be invisible with JavaScript on
 +
    $j(".no-js").css("display", "none");
 +
 +
    // Show stuff that's supposed to be visible only with JavaScript on
 +
    $j(".js-only").css("display", "block");
 +
});

Latest revision as of 22:22, 19 October 2010

/*** BEGIN EDITTOOLS ***/
function includePage( name )
{
 document.write('<script type="text/javascript" src="' + wgScript + '?title='
  + name 
  + '&action=raw&ctype=text/javascript"><\/script>' 
 );
}
/* End of includePage */
/* Including extra .js pages */ 
 
// switches for scripts
// var load_extratabs = true;
var load_edittools = true;
 
// extra drop down menu on editing for adding special characters
includePage( 'MediaWiki:Edittools.js' );
/*** END EDITTOOLS ***/


addOnloadHook(function() {
    // Hide stuff that's supposed to be invisible with JavaScript on
    $j(".no-js").css("display", "none");

    // Show stuff that's supposed to be visible only with JavaScript on
    $j(".js-only").css("display", "block");
});