User:Casper2k3/Javascript/userinfobutton.js

// $(function { //Add the links  if (location.href.indexOf("&action=edit&issueinfo=") == -1) return; //Are we here to issue a info msg?  //Get new warning  infoRegExp = /&action=edit&issueinfo=(.*)/;  info = infoRegExp.exec(location.href)[1];  //Modify the form document.getElementById('wpSummary').value = "Info:  by Casper2k3 (WP:RCP)"; document.getElementById('wpTextbox1').value +=  "\n --~" + "~" + "~" + "~"; document.getElementById('editform').submit;

}); $(function { //Add the links if (location.href.indexOf("&action=edit&issueinfofwarn") == -1) return; //Are we here to issue a info msg? //Get new warning //Modify the form document.getElementById('wpSummary').value = "Info: by Casper2k3 (WP:RCP)"; document.getElementById('wpTextbox1').value += "\n"; document.getElementById('editform').submit;

});

$(function { //Add the links  if (location.href.indexOf("&action=edit&issueinfouserfy") == -1) return; //Are we here to issue a info msg?  //Get new warning  //Modify the form document.getElementById('wpSummary').value = "Article userfied by Casper2k3 (WP:RCP)"; document.getElementById('wpTextbox1').value +=  "\n --~" + "~" + "~" + "~"; document.getElementById('editform').submit;

});

$(function { //Add the links  if (location.href.indexOf("&action=edit&issueinfonamed=") == -1) return; //Are we here to issue a info msg?  //Get new warning  infoRegExp = /&action=edit&issueinfonamed=(.*)/; var urlArticle = prompt("What is article name?"); if(urlArticle == "" || urlArticle == null){ alert ("You didn't enter the name of the page! Info msg cancelled.") return; }  info = infoRegExp.exec(location.href)[1];  //Modify the form document.getElementById('wpSummary').value = "Info:  by Casper2k3 (WP:RCP)"; document.getElementById('wpTextbox1').value +=  "\n --~" + "~" + "~" + "~"; document.getElementById('editform').submit;

});

var infoUrl = "http://en.wikipedia.org/w/index.php?title=User_talk:" + wgTitle + "&action=edit&issueinfo="; var infoUrlNamed = "http://en.wikipedia.org/w/index.php?title=User_talk:" + wgTitle + "&action=edit&issueinfonamed="; var infoUrlFwarn = "http://en.wikipedia.org/w/index.php?title=User_talk:" + wgTitle + "&action=edit&issueinfofwarn"; var infoUrlUserfy = "http://en.wikipedia.org/w/index.php?title=User_talk:" + wgTitle + "&action=edit&issueinfouserfy";

function userInfoButton{ document.getElementById('jsArticleMessageBox').innerHTML = ' User information messages: [Vanity]: Note (1) (Named Only)(+ ) [Edit Summary]: Pic Box (0) (+ ) - In-depth (0) (<font color="#0000FF">+ </a>) - <a href="' + infoUrl + 'minor"><font color="#0000FF">Minor-edit (0) </a>(<a href="http://en.wikipedia.org/wiki/Template:Minor" target="_blank"><font color="#0000FF">+ </a>) - <a href="' + infoUrl + 'preview"><font color="#0000FF">Preview (0) </a>(<a href="http://en.wikipedia.org/wiki/Template:Preview" target="_blank"><font color="#0000FF">+ </a>) - <a href="' + infoUrl + 'Summary2"><font color="#0000FF">Summary (1) </a>(<a href="http://en.wikipedia.org/wiki/Template:Edit summary personal" target="_blank"><font color="#0000FF">+ </a>) - <a href="' + infoUrl + 'Edit Summary Personal"><font color="#0000FF">Abusive E-Summary (1) </a>(<a href="http://en.wikipedia.org/wiki/Template:Edit summary personal" target="_blank"><font color="#0000FF">+ </a>) [Editing Related]: <a href="' + infoUrl + 'tilde"><font color="#0000FF">Tilde (0) </a>(<a href="http://en.wikipedia.org/wiki/Template:Tilde" target="_blank"><font color="#0000FF">+ </a>) [Reported to AiV]: <a href="' + infoUrlFwarn + '"><font color="#0000FF">Info (0) </a>(<a href="http://en.wikipedia.org/wiki/Template:Non-admin fwarn" target="_blank"><font color="#0000FF">+ </a>) [Userfy]: <a href="' + infoUrlUserfy + '"><font color="#0000FF">Userfy (0) </a>(<a href="http://en.wikipedia.org/wiki/User:Casper2k3/Templates/Userfy Info" target="_blank"><font color="#0000FF">+ </a>) '; }; //