User:Manishearth/tabs.js

//Floating faithful search bar $(function{ document.getElementById("mw-page-base").innerHTML+='  -     '; document.getElementById("searchInput2").onkeyup=function {document.getElementById("searchInput2Suggest").style.position="fixed"}

//And some nice little links document.getElementById('floatcont').innerHTML+=' +  ' mw.util.addPortletLink("p-personal2",wgServer+"/wiki/Special:OldReviewedPages","Pending Changes"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/Special:Watchlist","Watchlist"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/User:Manishearth/Mylinks","My links"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/User:Manishearth/IRC","IRC"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/User:"+wgUserName,wgUserName); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/User_talk:"+wgUserName,"Talk"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/Special:Preferences","Preferences"); mw.util.addPortletLink("p-personal2","http://en.wikipedia.org/w/index.php?title=Special:RecentChangesLinked&limit=500&days=30&target=User:Manishearth/Help_pages","Help pages"); mw.util.addPortletLink("p-personal2",wgServer+"/wiki/Special:RecentChangesLinked/User:Manishearth/Ambassador/AWatch","Ambassador"); }); function addNotification(link, image,title){ var src; switch(image){ case 'exclamation': src='http://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Nuvola_apps_important.svg/25px-Nuvola_apps_important.svg.png'; break; case 'stophand': src='http://upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/30px-Stop_hand_nuvola.svg.png'; break; case 'info': src='http://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Information.svg/25px-Information.svg.png'; break; default: src=image;

} document.getElementById('notifications').innerHTML+='</a>'

} if(document.getElementById('mw-youhavenewmessages')){ addNotification("http://en.wikipedia.org/wiki/User_talk:"+wgUserName,"exclamation","You have new messages"); } function toggleM(obj) {	var el = document.getElementById(obj);	if ( el.style.display != 'none' ) {		el.style.display = 'none';	}	else {		el.style.display = '';	}}

// Custom tabs addOnloadHook( function { // New Pages mw.util.addPortletLink('p-interaction','http://en.wikipedia.org/wiki/Special:NewPages','New Pages', 'n-newpage','New Pages', 'n')

// IP Contribs mw.util.addPortletLink('p-interaction','http://en.wikipedia.org/w/index.php?namespace=0&tagfilter=&hideliu=1&title=Special:RecentChanges','IP Contribs', 'n-ipc','IPs Contributions', 'i')

//Add a "Commons upload" link mw.util.addPortletLink('p-tb','http://commons.wikimedia.org/wiki/Commons:Upload','Commons upload', 't-upload-c','Upload to Commons', 'u')

//Convinient link to a "my links" page mw.util.addPortletLink('p-personal','http://en.wikipedia.org/wiki/User:Manishearth/Mylinks','My links', 'pt-mylinks','My links', 'm') mw.util.addPortletLink("p-personal","http://en.wikipedia.org/w/index.php?title=Special:RecentChangesLinked&limit=500&days=30&target=User:Manishearth/Help_pages","Help pages");

//My ACC Minions BWAHAHAHAHA (I usually check on these every now and then and see what they're doing--I look out for blue contrib links and see their evil deeds :P ) mw.util.addPortletLink('p-tb','http://en.wikipedia.org/w/index.php?title=Special:Log&type=newusers&user=Manishearth&limit=500','Minions')

//WHere I keep track of WP:ONLINE stuff mw.util.addPortletLink('p-tb','http://en.wikipedia.org/wiki/User:Manishearth/Ambassador','Ambassador')

//Talkback link if(wgCanonicalNamespace == "User_talk" || wgCanonicalNamespace == "User"){

var talkpage="User_talk:" + wgPageName.split(":")[1]; var link="http://en.wikipedia.org/w/index.php?title="+talkpage+"&action=edit&section=new&preloadtitle=Talkback&preload=User:Manishearth/Tb" mw.util.addPortletLink('p-cactions',link,'Talkback','ca-tb','Talkback', 't') //document.getElementById('ca-tb').style.background='green' } });