User:Lawilkin/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// 
function doQwikify() {
  document.editform.wpTextbox1.value = '{' + '{' + 'Wikify-date|' + '{' + '{' + 'subst:CURRENTMONTHNAME}} ' + '{' + '{' + 'subst:CURRENTYEAR}}}}\n\n' + document.editform.wpTextbox1.value;
  document.editform.wpSummary.value = 'Marked for wikification.';
  document.editform.wpMinoredit.checked = true;
  document.editform.submit();
}

function addQwikify() {
  addTab("javascript:doQwikify()", "wikify", "ca-wikify", "Mark for wikification", "");
  akeytt();
}

$(function() {
  if (document.title.indexOf("User:") != -1 || document.title.indexOf("User talk:") != -1) {
     return;
  }
  if (document.title.indexOf("Editing ") != -1) {
  addOnloadHook(addQwikify);
  }
});

// by [[User:Raylu|raylu]]
//

//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
  mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); }

//<nowiki> Admin-like RC Patrol tools

mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:VoA/monobook.js' 
             + '&action=raw&ctype=text/javascript');

//</nowiki>[[Category:Wikipedians who use RC script]]

// [[User:Lupin/popups.js]]

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

// [[User:Lupin/popups.js]]

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');


// 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=around", "Around", "pt-status-around", "I'm around here somewhere", "");
  addlilink(contribs, linkprefix+user+subpage+"&action=edit&newstatus=busy", "Busy", "pt-status-busy", "I'm busy!", "");
  addlilink(contribs, linkprefix+user+subpage+"&action=edit&newstatus=elsewhere", "Elsewhere", "pt-status-out", "I'm elsewhere", "");
  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 = "{{User:"+user+scheme+"|"+status+"}}";
  document.getElementById('wpSummary').value = "Status: "+status;
  document.getElementById('wpMinoredit').checked = 'checked';
  //Submit it!
  document.getElementById('editform').submit();
});

//