User:BranStark/monobook.js

importScript('User:BranStark/popupBookmarks.js'); //credit goes to User:Roux importScript('User:Henrik/js/automod.js'); importScript('User:BranStark/script.js'); importScript('User:Voice_of_All/Specialadmin/monobook.js'); importScript('User:Voice of All/Addtabs/monobook.js'); importScript('User:Cameltrader/Advisor.js'); importScript('User:Mr.Z-man/closeAFD.js'); importScript ('User:Ais523/editcount.js'); importScript('User:AzaToth/twinkle.js');

TwinkleConfig = { revertMaxRevisions             :       50, userTalkPageMode               :       'window', showSharedIPNotice             :       false, openTalkPage                   :       [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert       :       false, openAOLAnonTalkPage            :       false, summaryAd                      :       " ", deletionSummaryAd              :       " ", protectionSummaryAd            :       " ", watchSpeedyPages               :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ], watchProdPages                 :       true, openUserTalkPageOnSpeedyDelete :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages             :       [], markRevertedPagesAsMinor       :       [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete         :       false, watchWarnings                  :       false, markAIVReportAsMinor           :       true, markSpeedyPagesAsMinor         :       true, offerReasonOnNormalRevert      :       true, orphanBacklinksOnSpeedyDelete  :       {orphan:true, exclude:['g6']} };

importScript("User:Lupin/recent2.js");

// User:Lupin/popups.js

//importScript('User:Lupin/popups.js');

/* // install User:Cacycle/wikEd in-browser text editor document.write('');

importScript('User:Alex Smotrov/wlunwatch.js');

/* Watchlist notifier (User:Ais523/watchlistnotifier.js); displays a message every time a watched page changes. */ // var wmwpajax; // From WP:US mainpage (wpajax renamed to wmwpajax) wmwpajax={ download:function(bundle) { // mandatory: bundle.url // optional: bundle.onSuccess (xmlhttprequest, bundle) // optional: bundle.onFailure (xmlhttprequest, bundle) // optional: bundle.otherStuff OK too, passed to onSuccess and onFailure var x = window.XMLHttpRequest ? new XMLHttpRequest
 * window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
 * false;

if (x) { x.onreadystatechange=function { x.readyState==4 && wmwpajax.downloadComplete(x,bundle); }; x.open("GET",bundle.url,true); x.send(null); } return x; }, downloadComplete:function(x,bundle) { x.status==200 && ( bundle.onSuccess && bundle.onSuccess(x,bundle) || true ) } }; // Example: // function dlComplete(xmlreq, data) { //     alert(data.message + xmlreq.responseText); // } // wmwpajax.download({url:'http://en.wikipedia.org/w/index.php?title=Thresher&action=raw', //                   onSuccess: dlComplete, message: "Here's what we got:\n\n" }); // End of WP:US quote function wmWatchEditFound(xmlreq, data) { var watchrev, watchsum, watchrevold, watchpage, junk; watchrev=xmlreq.responseText.split('timestamp="')[1].split('"')[0]; if(mw.config.get('wgPageName') == "Special:Watchlist") document.cookie="ais523wmwatchrev="+watchrev+".; path=/"; else { watchsum=xmlreq.responseText.split('comment="')[1].split('"')[0]; watchpage=xmlreq.responseText.split('title="')[1].split('"')[0]; try { watchrevold=document.cookie.split('ais523wmwatchrev=')[1].split('.')[0]; } catch(junk) {watchrevold=0;} watchsum=watchsum.split('<').join('&lt;').split('>').join('&gt;'); watchpage=watchpage.split('<').join('&lt;').split('>').join('&gt;'); if(watchrev!=watchrevold) document.getElementById('contentSub').innerHTML+= " \""+watchpage+'" changed: "'+watchsum+'". '; } } addOnloadHook(function { /* Find the top item in the watchlist, and its edit summary. We only need one item, so set the limit to 1 to ease the load on the server. */ //if(location.href.indexOf("/wiki/")!=-1) wmwpajax.download({url:'http://en.wikipedia.org/w/api.php?action=query&list=watchlist&wllimit=1&'+ 'wldir=older&format=xml&wlprop=comment|timestamp|title', onSuccess: wmWatchEditFound}); }); // //
 * ( bundle.onFailure && bundle.onFailure(x,bundle) || alert(x.statusText+': '+bundle.url));

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

/**** welcome new user ****/ document.write(' ');

// adds a 'logs for this page' link to the toolbox bar // if the page is a user's page, talk page or subpage, the link will go to logs for the user instead // if the page is a special page, then no link is displayed

addOnloadHook(function {

// if this is a user, show the logs for the user rather than the page if ( mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk" ) { url = mw.config.get('wgServer') + "/w/index.php?title=Special:Log&user=" + mw.config.get('wgTitle').split("/")[0]; } else if ( mw.config.get('wgCanonicalNamespace') == "Special" ) { // don't display link for special pages return; } else { url = mw.config.get('wgServer') + "/w/index.php?title=Special:Log&page=" + mw.config.get('wgPageName'); }

mw.util.addPortletLink("p-tb", url, "Logs", "pt-logs");

});

//

// Stub tag tab. Original version by User:ais523, on a request by User:thesublime514. // Enhancements made on requests by User:Alai and User:jj137. // (User:ais523/stubtagtab2.js) //

importScript('User:Ioeth/friendly.js');

FriendlyConfig = { summaryAd                      :       " ", topWelcomes                    :       false, watchWelcomes                  :       false, markWelcomesAsMinor            :       true, insertHeadings                 :       true, welcomeHeading                 :       "== Welcome ==", insertUsername                 :       true, insertSignature                :       true, quickWelcomeMode               :       "auto", quickWelcomeTemplate           :       "Welcome", maskTemplateInSummary          :       true, markSharedAsMinor              :       true, groupByDefault                 :       true, watchTaggedPages               :       false, markTaggedPagesAsMinor         :       true };

// User:Outriggr/metadatatest.js importScript('User:Outriggr/metadatatest.js'); assessmentMyTemplateCode = ["{"+"{WPBiography|class=|priority=|needs-infobox =|needs-photo =|listas=}}", "{"+"{WikiProject Kent|class=|importance=}}"]; assessmentDefaultProject = "WPBiography";

importScript('User:AWeenieMan/furme.js'); importScript('User:TheDJ/qui.js'); importScript('User:AndyZ/peerreviewer.js');

// addPurge addOnloadHook(function {    var hist; var url;    if (!(hist = document.getElementById('ca-history') )) return;    if (!(url = hist.getElementsByTagName('a')[0] )) return;    if (!(url = url.href )) return;    mw.util.addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'), 'purge', 'ca-purge', 'Purge server cache for this page', '0'); });

//

//This script (User:ais523/highlightmyname2.js) highlights all instances of the //logged-in user's username on pages by giving them a bright red background. It only //checks bodyContent, not titles or sidebars, and doesn't change edit windows or //Special:Preferences. // function highlightmyname(n,p) //node, parent node { while(n!=null) {   if(n.nodeType==3) //text node {     if(n.data.toLowerCase.indexOf(mw.config.get('wgUserName').toLowerCase)!=-1) {       var ix=n.data.toLowerCase.indexOf(mw.config.get('wgUserName').toLowerCase); var t1=ix?document.createTextNode(n.data.substr(0,ix)):null; var t2=document.createTextNode(n.data.substr(ix,mw.config.get('wgUserName').length)); var t3=ix+mw.config.get('wgUserName').length==n.data.length?null: document.createTextNode(n.data.substr(ix+mw.config.get('wgUserName').length)); var s1=document.createElement("SPAN"); s1.style.backgroundColor="#FF0000"; s1.appendChild(t2); var s2=document.createElement("SPAN"); if(t1!=null) s2.appendChild(t1); s2.appendChild(s1); if(t3!=null) s2.appendChild(t3); p.replaceChild(s2,n); if(t3!=null) highlightmyname(t3,s2); //find remaining occurences in the new nodes n=s2.nextSibling; }     else n=n.nextSibling; }   else {     if(n.firstChild!=null) highlightmyname(n.firstChild,n); n=n.nextSibling; } } } addOnloadHook(function {  if(location.href.indexOf("?ais523")==-1&&location.href.indexOf("&ais523")==-1&& location.href.indexOf("?action=edit")==-1&&location.href.indexOf("?action=submit")==-1&& location.href.indexOf("&action=edit")==-1&&location.href.indexOf("&action=submit")==-1&& location.href.indexOf("&action=raw")==-1&&wgPageName!="Special:Preferences")   highlightmyname(document.getElementById('bodyContent').firstChild, document.getElementById('bodyContent')); }); // //

//Hide Huggle edits function hidehugcontrib { var i,li,a; li=document.getElementById("bodyContent"); li=li.getElementsByTagName("li"); i=-1; a=new Array; while(++iHG\<\/a\>/))      s="none";    else      s="";    if(a[t]!=undefined) s=a[t]; else a[t]=s;    if(s!="") li[i].style.display=(li[i].style.display=="none"?"list-item":"none");  } } addOnloadHook(function  {  if((location.href.indexOf("Special:Contributions")!=-1||      location.href.indexOf("Special%3AContributions")!=-1)     &&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-1)    mw.util.addPortletLink('p-cactions', 'javascript:hidehugcontrib', 'show/hide huggle edits', 'ca-hidehug',                   "Show/hide pages made using Huggle", ''); }); //  //