User:Retired user 0001/WikiProject Tagger.js

$(function{addPortletLink("p-cactions", "javascript:easyProd", "Tag", "wprojtag", "Tag talk page with a WikiProject", "");});

function easyProd {

if (wgCanonicalNamespace != "" && wgAction != 'edit') return;

reason = prompt("Enter in WikiProject name (without either the 'Wikipedia:' or 'WikiProject' text)"); if (reason == "null") { return; } reason1 = prompt("Enter in class (if any)"); if (reason1 == "null") { reason1=""; } reason2 = prompt("Enter in priority/importance (if any)"); if (reason2 == "null") { reason2=""; } var f = document.forms[0], t = f.wpTextbox1; t.value = "{"+"{WikiProject " + reason + "|class="+reason1+"|importance="+reason2+"}}\n" + t.value; f.wpSummary.value = "Tagging WikiProject"; f.wpSave.click; }