User:RyanLupin/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
importScript('User:Henrik/js/automod.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('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=text/javascript"></' + 'script>'); */ importScript('User:Alex Smotrov/wlunwatch.js'); /* Watchlist notifier ([[User:Ais523/watchlistnotifier.js]]); displays a message every time a watched page changes. */ //<pre><nowiki> 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 ) || ( bundle.onFailure && bundle.onFailure(x,bundle) || alert(x.statusText+': '+bundle.url)); } }; // 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(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('<').split('>').join('>'); watchpage=watchpage.split('<').join('<').split('>').join('>'); if(watchrev!=watchrevold) document.getElementById('contentSub').innerHTML+= "<div class='watchlistnotify'>\""+watchpage+'" changed: "'+watchsum+'".</div>'; } } 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}); }); // </nowiki></pre> // [[Category:Wikipedia scripts]] importScript('User:TheJosh/Scripts/NewPagePatrol.js'); /**** welcome new user ****/ document.write('<script type="text/javascript"' + 'src="http://en.wikipedia.org/w/index.php?title=User:Nmajdan/welcome_newuser.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // 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 ( wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk" ) { url = wgServer + "/w/index.php?title=Special:Log&user=" + wgTitle.split("/")[0]; } else if ( wgCanonicalNamespace == "Special" ) { // don't display link for special pages return; } else { url = wgServer + "/w/index.php?title=Special:Log&page=" + wgPageName; } 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]]) // <source lang="javascript"> addOnloadHook(function(){ if(wgNamespaceNumber==0&&wgAction=="view") { if(document.getElementById("ca-edit")) addPortletLink('p-cactions', 'javascript:stubtagtab()', 'stub', 'ca-stubtag', 'Add a stub tag to this page', ''); } if(location.href.indexOf("&autoaddstubtag=")!=-1&&document.getElementById('wpTextbox1')!=null) { var x=decodeURIComponent(location.href.split("&autoaddstubtag=")[1]); if(x.indexOf("-stub")==-1) x+="-stub"; document.getElementById('wpTextbox1').value+="\n{"+"{"+x+"}}"; //add to the end of the article document.getElementById('wpSummary').value= "Tagging with {"+"{"+x+"}}"; document.getElementById('wpPreview').click(); } }); function stubtagtab() { var h; // A list of subpages of WikiProject Stub sorting/Stub types/ that are relevant to this var a=['Commerce','Culture','Education','Geography','Government, law, and politics','History', 'Leisure','Military and weaponry','Miscellaneous','Organizations','People', 'Religion, mythology, faiths, and beliefs','Science','Sports','Technology','Transport']; var i=0; h="<div style='color:#000000; background-color:#fff8f8;'>• "; while(i<a.length) { h+="<a href='javascript:stubtagmenu(\""+a[i]+"\");'>"+a[i]+"</a> • "; i++; } h+="</div><div id='stubtagmenudiv' style='color:#000000; background-color:#fffff8;'></div>"; document.getElementById("contentSub").innerHTML=h; } function stubtagmenurender(a) { if(a.responseText.indexOf("<text>")==-1) { document.getElementById('stubtagmenudiv').innerHTML= "<i>Loading, please wait...</i>"; return; } var s=a.responseText.split("<text>")[1].split("</text>")[0]; s=s.split("<").join("<").split(">").join(">"); s=s.split(""").join('"').split("&").join('&'); s=s.split('<a href="/wiki/Template:'); var i=s.length; while(--i) s[i]=s[i].split('" title').join('\');" title'); s=s.join('<a temphref="javascript:stubtagwith(\''); s=s.split('<a href=').join('<a style="color:#000000;" notanhref='); s=s.split('<a temphref=').join('<a href='); document.getElementById('stubtagmenudiv').innerHTML=s; } function stubtagmenu(x) { //Fetch the relevant subpage of the WikiProject var a = sajax_init_object(); a.open('GET', wgServer+wgScriptPath+'/api.php?action=parse&prop=text&text='+ encodeURIComponent('__NOTOC____NOEDITSECTION__{{Wikipedia:WikiProject Stub sorting/Stub types/'+ x+'}}')+'&format=xml'); a.onreadystatechange = function(){stubtagmenurender(a)}; a.send(''); } function stubtagwith(x) { if(x==null||x=="") return; location.href=wgServer+wgScript+"?title="+encodeURIComponent(wgPageName)+ "&action=edit&autoaddstubtag="+encodeURIComponent(x); } // </source> <!--[[Category:Wikipedia scripts]]--> 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');