User:Functoriality/monobook.js

// jncsp-start The section below (up to jncsp-end) is maintained by WikiProject_User_scripts/User-script_manager // jncsp-config setupPopups addLastDiff addQwikify addCleanup

if (location.href == "http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/User-script_manager") document.write(' ');

// From WikiProject User_scripts/Scripts/Add_LI_link, revision 73544143

function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {       if(key && title) {           ta[id] = [key, title]; }       else if(key) {           ta[id] = [key, '']; }       else if(title) {           ta[id] = ['', title]; }   }    // re-render the title and accesskeys from existing code in wikibits.js    akeytt; return li; }

// From WikiProject User_scripts/Scripts/Add_tab, revision 73544604

function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key) };

// From WikiProject User_scripts/Scripts/CleanupTab.js, revision 47809636

// CleanupTab.js // // This script adds a "cleanup" tab to the top of article pages // when in edit mode. It is disabled for the User namespace.

function doCleanup { document.editform.wpTextbox1.value = '{' + '{' + 'Cleanup-date|' + '{' + '{' + 'subst:CURRENTMONTHNAME}} ' + '{' + '{' + 'subst:CURRENTYEAR}}}}\n\n' + document.editform.wpTextbox1.value; document.editform.wpSummary.value = 'Marked for cleanup.'; document.editform.wpMinoredit.checked = true; document.editform.submit; }

function addCleanup { addTab("javascript:doCleanup", "cleanup", "ca-cleanup", "Mark for cleanup", ""); akeytt; }

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

// From WikiProject User_scripts/Scripts/Quick_wikify, revision 56374346

// &lt;nowiki&gt;If you are editing a page, click the wikify button on your tab bar to add "{Wikify-date|September 2007}" to the top, set "Marked for wikification." as the edit summary, mark it as a minor edit, and submit.&lt;/nowiki&gt;

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 raylu

// From WikiProject User_scripts/Scripts/Show_last_diff, revision 67477415

//From http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510

// addLastDiff $(function {    z=document.getElementById("content").childNodes;    for (var n=0;n ');

// jncsp-end