User:Bradv/monobook.js

importScript('User:Bradv/Scripts/MetaPagePreview.js');

//importScript('User:Bradv/Scripts/Menubook.js');

/*

importScript('User:Ale_jrb/Scripts/igloo.js'); // User:Ale_jrb/Scripts/igloo

importScript('User:Bradv/Scripts/MetaPagePreview.js');

importScript('User:Bradv/Scripts/CategoryMonitor.js');

//importScript('User:Bradv/NewPagePreview.js');

importScript('User:Bradv/AjaxPatrolLinks.js');

//importScript('User:Bradv/sprint.js');

//importScript('User:Bradv/splitpreview.js');

//importScript('User:Bradv/splittalk.js');

//importScript('User:Bradv/wikiBrowser.js');

importScript('User:AzaToth/twinkle.js');

TwinkleConfig = {

summaryAd : "",

deletionSummaryAd : "",

protectionSummaryAd : ""

};

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

FriendlyConfig = {

summaryAd : ""

};

importScript('user:js/watchlist.js')

importScript('User:Mr.Z-man/patrollinks.js'); //Patrol links on new pages

importScript('user:Sander Säde/quickpreview.js'); //Quick preview

importScript('User:Lupin/recent2.js'); //Monitor recent changes / watchlist - only works with monobook

//Wikipedia:WikiProject User scripts/Scripts/Search links - This script adds search links to the toolbox.

$(function () {

if (mw.config.get('wgCanonicalNamespace') == "Special")

return; // no links for special pages

var title = mw.config.get('wgTitle');

if (mw.config.get('wgCanonicalNamespace') != "")

title = title.replace(/^.*\//, ""); // subpage name only

var query = encodeURIComponent('"'+title+'" -Wikipedia' );

mw.util.addPortletLink('p-tb', 'http://www.google.com/search?&q='+query,

'Google', 't-googlesearch', 'Search Google for "'+title+'"', 'W');

mw.util.addPortletLink('p-tb', 'http://news.google.com/archivesearch?&as_price=p1&as_src=-newswire+-wire+-presswire+-PR+-press+-release&q='+query,

'Google News', 't-googlenewssearch', 'Search Google News Archive for "'+title+'"', 'N');

mw.util.addPortletLink('p-tb', 'http://books.google.com/books?&as_brr=3&q='+query,

'Google Books', 't-googlebookssearch', 'Search Google Books for "'+title+'"', 'B');

mw.util.addPortletLink('p-tb', 'http://scholar.google.com/scholar?&q='+query,

'Google Scholar', 't-googlescholarsearch', 'Search Google Scholar for "'+title+'"', 'S');

});

//User:Ais523/topcontrib.js - This script color-codes lines according to who has the top contribution for a page.

$(function () {

if((location.href.indexOf("Special:Contributions")!=-1||

location.href.indexOf("Special%3AContributions")!=-1)

&&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-1)

{

var i,li,a;

li=document.getElementById("bodyContent");

//li.getElementsByTagName("ul")[0].tagName="ol";

li=li.getElementsByTagName("li");

i=-1;

a=new Array();

while(++i

{

var s,t;

t=li[i].innerHTML.match(/"\/wiki\/([^"]*)"/)[1];

if(li[i].getElementsByTagName("strong").length>0)

s="#CCCCFF";

else

s="#FFCCCC";

if(a[t]!=undefined) s=(a[t]=="#CCCCFF"?"#CCFFFF":"#FFFFCC"); else a[t]=s;

li[i].innerHTML=""+li[i].innerHTML+"";

}

}

});

//Link to dashboard

$(function() {

loLogoutNode = document.getElementById("pt-logout");

loDashNode = mw.util.addPortletLink( "p-personal"

, mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/index.php?title=User:" + mw.config.get('wgUserName') + "/Dashboard"

, "My Dashboard"

, "pt-admindash"

, "Link to dashboard"

, "d"

, loLogoutNode );

});

//### old stuff ###

//importScript('User:Ais523/watchlistnotifier.js'); //Notifies of changes to watchlist at top of page

//importScript('User:Tra/userwatchlist.js'); //User:Tra/userwatchlist.js - User watchlist

//importScript('User:Bradv/catlist.js');

//importScript('User:Bradv/NewPagePatrol.js'); //Forked from TheJosh in order to ignore redirects

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

/**/