User:Cblair91/global.js

/* */ /* toolbar links JavaScript */

if(!window.ToolbarLinksLoad) addOnloadHook(addToolbarLinks); var ToolbarLinksLoad = true;

function addToolbarLinks { $('JS').appendTo('ul.tools'); $('CSS').appendTo('ul.tools'); $('Logs (RecentChanges</a> | <a href="/wiki/Special:Log/newusers">NewUsers</a> | <a href="/wiki/Special:AbuseLog">Abuse</a>)</li>').appendTo('ul.tools'); }

/* Define variables! */ var cg = ['Speedy deletion candidates', 'Speedy move candidates']; /* Categories to watch */ var excludeuser = "Cblair91"; /* what users to exclude from category notifier */ var autoWelcomeText = '~'; /* auto welcome text */

/* Include all the useful goodies! */ importArticles({   type: "script",    articles: [        "User:Cblair91/common.js",        "w:c:runescape:User:Cblair91/autowelcome.js", /* Auto welcome for talk pages */        //"w:c:runescape:User:Cblair91/ajaxrefresh.js", /* Auto refresh */        //"w:c:runescape:User:Cblair91/watchlist.js", /* Watch list notifier */        //"w:c:runescape:User:Cblair91/categories.js", /* Category notifier */        //"w:c:runescape:User:Joeytje50/dupes.js", /* Duplicate file detetion */    ] });

/* Change wiki activity to recent changes */ function WikiActivity2RecentChanges { $('a[href$="/wiki/Special:WikiActivity"]').attr("href", "/wiki/Special:RecentChanges").html("Recent Changes"); }

addOnloadHook(WikiActivity2RecentChanges);

/* Kill image popups */ window.wgEnableImageLightboxExt = false; function changeimagelinks { $('#WikiaArticle, .LatestPhotosModule, #article-comments').unbind('click.lightbox'); var a = document.getElementsByTagName('a'); for(var t = 0; t < a.length; ++t) { var a2 = a[t]; var img = a2.getElementsByTagName('img'); if(img[0] != null) { if(a2.href.indexOf('images.wikia.nocookie.net') != -1) a2.setAttribute('href', wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1)); for(var s = 0; s < 5; ++s) { if(a2.href.indexOf('images' + s + '.wikia.nocookie.net') != -1) a2.setAttribute('href', wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1)); }		}	} } addOnloadHook(changeimagelinks); /* */