User:Nishkid64/DYK/monobook.js

// //automate insertion of the following functions: // Article talk page: 10 June // Article creator's talk page: Article name // Nominator's talk page: 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 += ""+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 += ""+pipe_date+" \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 += ""+pipe_date+" \nThanks for your contributions! ~"; f.wpSummary.value = "Your WP:DYK nomination for " + page + " was successful" }

// end of file