User:Staffan15/global.js

function fixBlogLinks { rclist = ($("#mw-rc-subentries-0").length)?$("#bodyContent > div > table:contains('Blog comment')"):$("#bodyContent ul.special li:contains('Blog comment')"); if (wgPageName == "Special:RecentChanges") rclist.each(function (i) { lnk = $(this).find("a:contains('hist')").attr("href"); if (typeof(lnk) != "undefined") { rawID = lnk.replace(/.*curid=(.*?)&.*/,"$1"); $(this).find("a:contains('User blog:')").attr("href","/wiki/User_blog:" + lnk.replace(/.*User_blog_comment:(.*?\/.*?)\/.*/,"$1") + "#comm-" + rawID); } }); } function fbl { fixBlogLinks; $("#bodyContent").bind("ajaxPageLoad",fixBlogLinks); } addOnloadHook(fbl);

// if( wgNamespaceNumber != -1 && !window.SkinSwitchLoad  ) { addOnloadHook( addSkinSwitchButton ); } var SkinSwitchLoad = true; // prevent duplication

function addSkinSwitchButton { $(' Monobook').appendTo('#page_controls'); $(' Monaco').appendTo('#page_controls'); $(' Monaco (wiki default)').appendTo('#page_controls'); $('monaco').appendTo('#p-cactions > .pBody > ul'); $('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&useskin=monaco&usetheme=custom">monaco default</a></li>').appendTo('#p-cactions > .pBody > ul'); } //