_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

User:Kim Dent-Brown/monobook.js

In today's world, User:Kim Dent-Brown/monobook.js has become a topic of increasing importance and interest for various areas of society. Both on a personal and professional level, User:Kim Dent-Brown/monobook.js plays a fundamental role in the development and evolution of people and communities. Throughout history, User:Kim Dent-Brown/monobook.js has been the subject of study, debate and analysis, and its influence extends to multiple disciplines, from science and technology to art and culture. In this article, we will explore in depth the impact of User:Kim Dent-Brown/monobook.js on today's society, addressing its implications, applications and challenges from different perspectives. Additionally, we will examine how User:Kim Dent-Brown/monobook.js has shaped the way we think, act, and relate to the world around us, and how its continued evolution continues to impact our lives in significant ways.
// <nowiki>
// ]importScript('User:Lupin/popups.js');

/*
<pre> <nowiki>
Note: After saving, you have to bypass your browser's cache to see the changes.
To do this in Firefox/Mozilla/Safari: hold down Shift while clicking Reload, 
or press Ctrl-Shift-R). 
If you use Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.



/*
</nowiki> </pre>
==WikEd, replaces Firefox's text edit window ==
<pre> <nowiki> */

// install ] in-browser text editor
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript');

/*
</nowiki> </pre>
==Lupin's anti-vandal tools ==
<pre> <nowiki> */


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

/*
</nowiki> </pre>
==Popups==
<pre> <nowiki> */
/* ] */

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

/*{{User:AndyZ/peerreviewer.js}}*/
/*
</nowiki> </pre>
== Watchlist sorter ==
<pre> <nowiki>
Sorts your watchlist by namespace, and also adds spaces for readability.
*/

$(function (){
  if (location.href.indexOf('Special:Watchlist') == -1) return; //Are we on a watchlist?
  //days = document.getElementById('bodyContent').getElementsByTagName('ul');
  days = document.evaluate( //Hell knows how it works - found in "Dive into Greasemonkey"
    "//ul",
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);
  for (d = 0; d < days.snapshotLength; d++) { //For each day
    day = days.snapshotItem(d);
    newday = document.createElement('ul'); //This will replace the old listing
    while ((diffs = day.getElementsByTagName('li')).length > 0) { //Are there any diffs left?
      //Try to extract the namespace
      As = diffs.getElementsByTagName('a');
      if (As.innerHTML == 'diff')
        pagename = As.innerHTML;
      else
        pagename = As.innerHTML;
      if (pagename.indexOf(':') == -1)
        namespace = 'Main';
      else
        namespace = pagename.split(':'); //This will fail for articles which contain ":" in name
      hdrs = newday.getElementsByTagName('h5'); //Get the list of namespace headers
      hdr = null;
      for (j=0; j<hdrs.length; j++) //Find the header
        if (hdrs.innerHTML==namespace) {
          hdr = hdrs; break;
        }
      if (hdr==null) { //Not found? Make a new one!
        hdr = document.createElement('h5');
        hdr.innerHTML = namespace;
        newday.appendChild(hdr);
        namespacesub = document.createElement('ul');
        newday.appendChild(namespacesub);
      }
      hdr.nextSibling.appendChild(diffs); //Move the diff
    }
    newday.appendChild(document.createElement('hr')); //For readablility
    day.parentNode.replaceChild(newday,day);
  }
});



importScript(']');




/* How to use:
* 
* Add the following to ] as a
* logged-in user using the monobook skin:
*   importScript('User:Gracenotes/rollback.js');
*
* On diff pages, a "sum" link will appear next to "rollback".
* When you click on "sum", you will be prompted to enter a
* summary. Press "Cancel" to cancel, and leave a blank summary
* to use the default. In the summary, the text "$user" will
* automatically be replaced with the user name you're reverting.
* e.g., "rv edits by $user; not true"
*/
 
function addSumLink() {
var ntitle2 = document.getElementById("mw-diff-ntitle2")
if (!ntitle2) return;
var rbnode = getElementsByClassName(document.getElementById("mw-diff-ntitle2"), "span", "mw-rollback-link");
if (rbnode.length != 0)
addRollbackSummaryLink(rbnode);
}
 
function confirmRollback() {
var url = this.href;
var user = url.match(/from=(*)/);
if (!user) return;
var user = decodeURIComponent(user.replace("+", " "));
var summary = prompt("Enter a summary to use for rollback.\n\nLeave blank to use the default. $user will be replaced with \"" + user + "\".")
if (summary == undefined)
return false;
else if (summary == "")
return true;
this.href += "&summary=" + encodeURIComponent(summary.replace(/\$user/g, user));
return true;
};
 
function addRollbackSummaryLink(rbnode) {
var rblink = rbnode.getElementsByTagName("a")
var alink = rblink.cloneNode(true);
alink.className = ""; //don't confuse other scripts
alink.firstChild.nodeValue = "sum";
alink.onclick = confirmRollback;
rbnode.insertBefore(alink, rblink.nextSibling);
rbnode.insertBefore(document.createTextNode("|"), alink);
}
 
$(addSumLink);




//this helps automate AfD closing by adding a 'close' tab to AfD debates
//written by ] based on ] by ]

function autoafd_result()
{
var close = prompt("Result of debate?")
var f = document.editform, t = f.wpTextbox1;
t.value = t.value.split('{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD').join('{{ns:0');
t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + "~" + "~" + "~" + "~" + '\n' + '\n' + t.value;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "ab" + "}}";
f.wpSummary.value = "Closing debate; result was " + close;
}

function autoafd_relist()
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "relist" + "|~" + "~" + "~" + "~}}";
f.wpSummary.value = "Relisting debate";
}

function autoafd_keep()
{
var date = prompt("Nomination was made when?")
var votepage = prompt("Vote page is? (Enter 'd' for default.)")
var f = document.editform, t = f.wpTextbox1;

// If default votepage...
if (votepage=="d")
{
var temp = document.editform.action.split("/w/index.php?title=");
var temp = temp.split("&action=submit");
var temp = temp.substring(5);
var votepage = temp;
}

t.value = "{{" + "oldafdfull" + "|date=" + date + "|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
f.wpSummary.value = "Article survived AfD";
}

function autoafd_no_consensus()
{
var date = prompt("Nomination was made when?")
var votepage = prompt("Vote page is? (Enter 'd' for default.)")
var f = document.editform, t = f.wpTextbox1;

// If default votepage...
if (votepage=="d")
{
var temp = document.editform.action.split("/w/index.php?title=");
var temp = temp.split("&action=submit");
var temp = temp.substring(5);
var votepage = temp;
}

t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''no consensus'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
f.wpSummary.value = "Article survived AfD with no consensus";
}

function autoafd_redirect()
{
var date = prompt("Nomination was made when?")
var redirect = prompt("Redirect to?")
var votepage = prompt("Vote page is? (Enter 'd' for default.)")
var f = document.editform, t = f.wpTextbox1;

// If default votepage...
if (votepage=="d")
{
var temp = document.editform.action.split("/w/index.php?title=");
var temp = temp.split("&action=submit");
var temp = temp.substring(5);
var votepage = temp;
}

t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''redirect to ]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
f.wpSummary.value = "Article redirected to ] as per AfD";
}

function autoafd_merge()
{
var date = prompt("Nomination was made when?")
var redirect = prompt("Merge and redirect to?")
var votepage = prompt("Vote page is? (Enter 'd' for default.)")
var f = document.editform, t = f.wpTextbox1;

// If default votepage...
if (votepage=="d")
{
var temp = document.editform.action.split("/w/index.php?title=");
var temp = temp.split("&action=submit");
var temp = temp.substring(5);
var votepage = temp;
}

t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''merge and redirect to ]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
f.wpSummary.value = "Article merged and redirected to ] as per AfD";
}

function autoafd_other()
{
var date = prompt("Nomination was made when?")
var result = prompt("Result was?")
var votepage = prompt("Vote page is? (Enter 'd' for default.)")
var f = document.editform, t = f.wpTextbox1;

// If default votepage...
if (votepage=="d")
{
var temp = document.editform.action.split("/w/index.php?title=");
var temp = temp.split("&action=submit");
var temp = temp.substring(5);
var votepage = temp;
}

t.value = "{{" + "oldafdfull" + "|date=" + date + "|result='''" + result + "'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
f.wpSummary.value = "AfDed; result was " + result;
}

function autoafd_add_afd_tabs()
{
// Only add for pages with the right string somewhere in the title
if (document.title.indexOf("Editing Wikipedia:Articles for deletion/") != -1)
{
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_result()', "close");
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_relist()', "relist");
}
if (document.title.indexOf("Editing Talk:") != -1)
{
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_keep()', "keep");
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_no_consensus()', "no consensus");
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_redirect()', "redirect");
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_merge()', "merge");
mw.util.addPortletLink('p-cactions', 'javascript:autoafd_other()', "other");
}
}

$(autoafd_add_afd_tabs);

//end AfD closing script

//

importScript('User:Mr.Z-man/closeAFD.js');
// </nowiki>