Project:Defsam

From MediaWiki.org
Jump to navigation Jump to search
Other languages: English  • Nederlands

Defsam is a script for standard edit summaries

Create[edit]

Add the following code to your defsam.js:

//********************************
// Own script for                *
// standard edit summaries.           *
//                               *
// By: Sumurai8                  *
// Problems/bugs: My talk        *
//********************************
 
//******************************************
//Toevoegen van de samenvattingen:
//
 
array_sam = 
  { "<add a name>": "<add text>",
    "<add a name>": "<add text>",
    "<add a name>": "<add text>",
    "<add a name>": "<add text>"
  }
 
//until here
//******************************************
 
jQuery( document ).ready( function( $ ) {
  $('<span id="standaardsamenvattingen">Standaard: </span>').insertBefore( $('#wpSummaryLabel') )
  jQuery.each(array_sam, function(naam, sam) {
    $('#standaardsamenvattingen').append(
      $('<a style="cursor:pointer; cursor:hand;"></a>').text(naam).click( function() {
        $('#wpSummary').val(sam);
      } )
    )
  } )
  $(document.createTextNode('; ')).insertAfter('#standaardsamenvattingen a')
} );

The source of this script is from Wikipedia by Sumurai8. Text from Wikipedia is licensed under CC BY-SA 3.0 & GDFL.

Import[edit]

When you have added the previous text in your defsam.js, you must add the following text in your common.js or <skinnname>.js

importScript('Special:MyPage/defsam.js');

Note[edit]

Is there a problem? Contact Southparkfan or Sumurai8.