Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// <nowiki> 
//automate insertion of the following functions:
// Article talk page: {{subst:dyktalk|10 June|2006}}
// Article creator's talk page: {{subst:UpdatedDYK|[[Article name]]}}
// Nominator's talk page: {{subst:UpdatedDYKNom|[[Article name]]}}

function pipe_date()
{
  var months = new Array('January', 'February', 'March', 'April', 'May', 'June',
                         'July', 'August', 'September', 'October', 'November', 'December');
  var date = new Date();
  var yearStr = date.getUTCFullYear();
  var dayMoStr = months[date.getUTCMonth()] +" "+ date.getUTCDate();
  var t = dayMoStr+"|"+yearStr;
  return t;
}

function dyk_talk()
{
  
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:dyktalk|"+pipe_date()+"}}  ~~~~";
  f.wpSummary.value = "This article was selected for [[WP:DYK|]]!" 

}

function updated_dyk()
{
  var page = prompt("User created which article?")
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:UpdatedDYK|"+pipe_date()+"|" + page + "}} \nThanks for your contributions! ~~~~";
  f.wpSummary.value = "Your  article, ''[[" + page + "]]'', was selected for [[WP:DYK|]]!" 
}

function updated_dyk_nom()
{
  var page = prompt("User nominated which article?")
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:UpdatedDYKNom|"+pipe_date()+"|" + page + "}} \nThanks for your contributions! ~~~~";
  f.wpSummary.value = "Your [[WP:DYK|]] nomination for [[" + page + "]] was successful" 
}

// end of file </nowiki>