User:333-blue/monobook.js

importScript('User:TheJosh/Scripts/NewPagePatrol.js');

function addlilink(node, href, text, id, tooltip, accesskey) { if( !node.parentNode.id ) jsMsg( "You are using an outdated script that is using an old addlilink. Report your problem to get it fixed.")

return mw.util.addPortletLink( node.parentNode.id, href, text, id, tooltip, accesskey); }

// mw.util.addPortletLink // STATUS CHANGER $(function { var user = document.getElementById( 'pt-userpage' ).firstChild.firstChild.data;  var subpage = "/Status";  var scheme = "/StatusTemplate";  var linkprefix = "http://en.wikipedia.org/w/index.php?title=User:";  var contribs = document.getElementById( 'pt-mycontris' );  //Add the links  addlilink(contribs, linkprefix+user+subpage+"&action=edit&newstatus=in", "In", "pt-status-in", "I'm in!", "");  addlilink(contribs, linkprefix+user+subpage+"&action=edit&newstatus=busy", "Busy", "pt-status-busy", "I'm busy!", "");  addlilink(contribs, linkprefix+user+subpage+"&action=edit&newstatus=out", "Out", "pt-status-out", "I'm out!", "");  if (location.href.indexOf("&action=edit&newstatus=") == -1) return; //Are we here to auto-edit the status?  //Get new status  statusRegExp = /&action=edit&newstatus=(.*)/;  status = statusRegExp.exec(location.href)[1];  //Modify the form  document.getElementById('wpTextbox1').value = ""; document.getElementById('wpSummary').value = "Status: "+status; document.getElementById('wpMinoredit').checked = 'checked'; //Submit it! document.getElementById('editform').submit; });

//