_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

User:GhostInTheMachine/SDsummary.js

Today, User:GhostInTheMachine/SDsummary.js is a highly relevant and topical topic that draws the attention of experts and the general public. It is a topic that does not leave anyone indifferent, since its repercussions can be very significant in different areas of society. For that reason, it is important to delve deeper into User:GhostInTheMachine/SDsummary.js to understand its impact and generate an informed debate about it. In this article, we will explore different aspects of User:GhostInTheMachine/SDsummary.js, from its origin and evolution to its possible implications in the future. In addition, we will analyze various perspectives on User:GhostInTheMachine/SDsummary.js with the aim of enriching knowledge and providing a more complete and global vision on this topic.
// list of buttons
SDsummaryList = [

//	Button text # WP shortcut # summary text
"SDSHORT     # SDSHORT     # Shorten short description",
"SDNONE      # SDNONE      # Set Short description to none",
"Uppercase   # SDFORMAT    # Uppercase first letter of short description",
"Plaintext   # SDFORMAT    # Plain text short description",
"SDDATES     # SDDATES     # Format short description dates",
"SDDUPLICATE # SDDUPLICATE # Simplify short description",
"SDAVOID     # SDAVOID     # Simplify short description",
"SDNOTDEF    # SDNOTDEF    # Short description is not a definition"

];

console.log('SDsummary loaded')

mw.loader.using(
  ,
  function() {
    if( mw.config.get('wgIsArticle') && mw.config.get('wgNamespaceNumber') === 0 ) {
      SDsummaryInit(10);
    }
  },
  function() {
    alert('SDsummary needs the SDhelper gadget');
  }
);

// add CSS
mw.util.addCSS("button.SDsummaryButton { margin-top: 5px; margin-right: 5px; background-color: gold; ");

// use the list to create buttons
function SDsummaryInit(safety) {
  console.log('SDsummary init', safety);

  var $sdh = $('#sdh');
  if($sdh.length < 1 && safety > 0) {     // allow only a limited number of checks
    // SDhelper is not set up yet
    setTimeout(SDsummaryInit, 100, safety-1);
    return;
  }

  var SDsummaryBox = $('#contentSub');    // where to put the buttons
  SDsummaryList.forEach(function(s){
    var w = s.split('#');
    var b = $('<button class="SDsummaryButton" data-text="' + w.trim() + '" data-wp="' + w.trim() + '">' + w.trim() + '</button>');
    SDsummaryBox.append(b);
    b.click(SDsummaryPaste);
  });
}

// button click code to set and display the summary
function SDsummaryPaste(){
  var txt = $(this).data('text');
  var wp  = $(this).data('wp');
  $('#sdh-summarybox>input').val(txt + ' — ]');
  $('#sdh-summarybox').removeClass('oo-ui-element-hidden');
  if(wp === "SDNONE") {
  	$('#sdh-descriptionbox>input').val("none").change();
  }
}