User:Soxred93/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
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:Lupin/recent2.js'); importScript('User:DStoykov/defaultsort.js'); //[[User:DStoykov/defaultsort.js]] importScript('Wikipedia:WikiProject User scripts/Scripts/Replace'); //[[Wikipedia:WikiProject User scripts/Scripts/Replace]] importScript('Wikipedia:WikiProject User scripts/Scripts/Autolink'); //[[Wikipedia:WikiProject User scripts/Scripts/Autolink]] importScript('Wikipedia:WikiProject User scripts/Scripts/Six tabs'); //[[Wikipedia:WikiProject User scripts/Scripts/Six tabs]] importScript('User:Ais523/hidetopcontrib.js'); //[[User:Ais523/hidetopcontrib.js]] importScript('User:Animum/count.js'); //[[User:Animum/count.js]] importScript('User:Henrik/js/live-edit-counter.js'); // [[User:Ais523/votesymbols.js]] // Code for adding icons to !votes in AfDs, RfAs, etc.. Doesn't affect the page, just // shows the icons when this code is installed. // Please see [[:Image:Votesymbols.js-enhanced_SfD.png]] for copyright info on the images that are added. function lowerNoPunct(s) { return s.toLowerCase().split('.').join('').split(',').join('').split(':').join('').split(';').join('').split('+').join(''); } addOnloadHook(function() { if(wgNamespaceNumber==0) return; //avoid article space, generally speaking if(wgNamespaceNumber==2) return; //I've had enough with the icons appearing in userboxes... var vs= "http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/15px-Symbol_support_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/15px-Symbol_keep_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/15px-Symbol_oppose_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_delete_vote.svg/15px-Symbol_delete_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/15px-Symbol_neutral_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/15px-Symbol_merge_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Symbol_move_vote.svg/15px-Symbol_move_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/15px-Symbol_redirect_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/15px-Symbol_opinion_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_comment_vote.svg/15px-Symbol_comment_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Symbol_unsupport_vote.svg/15px-Symbol_unsupport_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_question.svg/15px-Symbol_question.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Symbol_divide_vote.svg/15px-Symbol_divide_vote.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/5/54/Symbol_wait.svg/15px-Symbol_wait.svg.png#"+ "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/15px-Face-grin.svg.png"; var vt=vs.split("#"); var la=new Array(); la['support']=0; la['endorse']=0; la['keep']=1; la['oppose']=2; la['overturn']=2; la['object']=2; la['delete']=3; la['neutral']=4; la['merge']=5; la['upmerge']=5; la['move']=6; la['rename']=6; la['userfy']=6; la['transwiki']=6; la['redirect']=7; la['opinion']=8; la['relist']=8; la['subst']=8; la['salt']=8; la['change']=8; // Note that icon 8 on the list is often used for debate-specific !votes la['comment']=9; la['update']=9; la['note']=9; la['delist']=10; la['question']=11; la['split']=12; la['wait']=13; la['bjaodn']=14; var btc=document.body.getElementsByTagName("B"); i=btc.length; while(i--) { var j,k; j=btc[i].innerHTML.split("<").join(" ").split(">").join(" ").split("/").join(" ").split(" "); k=0; var x=""; while(k<j.length) { if(lowerNoPunct(j[k])=="don't"||lowerNoPunct(j[k])=='not' ||lowerNoPunct(j[k])=='no'||lowerNoPunct(j[k])=='without') break; var l=la[lowerNoPunct(j[k])]; if(l!=undefined) { x+="<IMG SRC='"+vt[l]+"' /> " } k++; } if(x!="") btc[i].innerHTML=x+btc[i].innerHTML; } }); //[[Category:Wikipedia scripts]] importScript('User:AzaToth/twinkle.js'); importScript('User:Ioeth/friendly.js'); importScript("Wikipedia:WikiProject User scripts/Scripts/Time"); importScript("User:Ais523/topcontrib.js"); importScript('User:AWeenieMan/furme.js'); // [[User:Henrik/afc-helper]] importScript('User:Henrik/js/afc-helper.js'); addOnloadHook(function() { var x=document.getElementById('ca-history'); if(x!=null) addPortletLink('p-cactions', wgServer+wgScript+"?title="+encodeURIComponent(wgPageName)+ "&action=purge", 'Purge', 'ca-edit-9', 'Purge the cache', '9', x); }); addOnloadHook(function() { var x=document.getElementById('ca-history'); if(x!=null) addPortletLink('p-tb', wgServer+wgScript+"?title=Special:Prefixindex/"+encodeURIComponent(wgPageName), 'Prefixindex', 'ca-edit-9', 'Prefixindex', x); }); TwinkleConfig = { revertMaxRevisions : 50, userTalkPageMode : 'tab', showSharedIPNotice : true, openTalkPage : [ 'vand' ], openTalkPageOnAutoRevert : false, summaryAd : "", deletionSummaryAd : "", protectionSummaryAd : "", watchSpeedyPages : [ ], watchProdPages : false, 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']} }; // [[User:Animum/reset.js]] by Animum importScript('User:Animum/reset.js'); //[[User:Animum/reset.js]] importScript('User:Ais523 non-admin/adminrights.js'); FurMeConfig = { actionOnSubmit : 'preview', cleanAmazonURLs : true, furmeLocation : 'filetoc', imageRemovalMethod : 'comment', openArticleMode : 'none', renameMethod : 'ifd', scrollerMax : 10, scrollerSkipDone : true, watchMyEdits : false, }; FriendlyConfig = { summaryAd : "", topWelcomes : false, watchWelcomes : true, markWelcomesAsMinor : true, insertHeadings : true, welcomeHeading : "== Welcome ==", insertUsername : true, insertSignature : true, quickWelcomeMode : "auto", quickWelcomeTemplate : "Welcome", maskTemplateInSummary : true, markSharedAsMinor : true, groupByDefault : true, watchTaggedPages : false, markTaggedPagesAsMinor : true }; /*** BEGIN WIKIBREAK ENFORCER ***/ addOnloadHook(function() { /*** Start editing here ***/ // When you want to end your break? // no leading zeroes. (example: 7 - correct, 07 - incorrect) var date = { year: 2008, month: 3, day: 16}; var time = { hours: 19, minutes: 0, seconds: 0 }; /*** Stop editing here ***/ var currentDate = new Date(); var enforcedBreakEnd = new Date( date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds); if (currentDate <= enforcedBreakEnd) { alert("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString() + "\n(now is "+currentDate.toLocaleString()+")\n\nBye!"); location = "http://"+location.host+"/w/index.php?title=" + "Special:Userlogout&returnto=Main_Page"; } }); /*** END WIKIBREAK ENFORCER ***/ //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. //<nowiki><pre> function highlightmyname(n,p) //node, parent node { while(n!=null) { if(n.nodeType==3) //text node { if(n.data.toLowerCase().indexOf(wgUserName.toLowerCase())!=-1) { var ix=n.data.toLowerCase().indexOf(wgUserName.toLowerCase()); var t1=ix?document.createTextNode(n.data.substr(0,ix)):null; var t2=document.createTextNode(n.data.substr(ix,wgUserName.length)); var t3=ix+wgUserName.length==n.data.length?null: document.createTextNode(n.data.substr(ix+wgUserName.length)); var s1=document.createElement("SPAN"); s1.style.backgroundColor="#00FFFF"; 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')); }); //</pre></nowiki> //[[Category:Wikipedia scripts]]