// "Proposed deletion" automation for the Notability wikiproject
$(addDeletionLink);
function addDeletionLink(){
if (/[?&]action=edit/.test(window.location.href) && !(/[?&]title=(Talk|User|User talk):/.test(window.location.href)) ) {
addPortletLink ('p-tb', 'javascript:proposeDeletion()', 'Propose deletion (WPNN)');
}
}
function proposeDeletion() {
var reason = prompt("Enter the rationale for deletion:","Fails [[WP:N]]; no independent sources cited.");
if (reason) {
var prodtag = "{"+"{subst:prod|"+reason+"}}\n";
var editsummary = "Proposal for deletion. Sorted as part of the [[WP:WPNN|Notability wikiproject]].";
var textbox = document.editform.wpTextbox1;
textbox.value = prodtag + textbox.value;
var edits = document.editform.wpSummary;
edits.value = editsummary;
document.editform.wpWatchthis.checked = true;
document.editform.wpPreview.click();
}
}