User:Year2000Prob/Monobook.js

// This is my Monobook js

$(function { Y2P.AddPortletItem({ text: "Chat channels", url: "irc://irc.freenode.net/" + (whichsite == "wp" ? "wikipedia" : "hrwiki,hrwiki-fanstuff"), id: "n-ircchannels", overwrite: (whichsite == "wp" ? null : "n-wikilink3"), addTo: (whichsite == "wp" ? "p-interaction" : null) })({   text: "Is this page valid XHTML?", url: "http://validator.w3.org/check?uri=" + encodeURIComponent(location), id: "f-valid", addTo: "footer" }); if (wgNamespaceNumber != -1) Y2P.AddPortletItem({ text: "purge", url: wgScript + "?title=" + wgPageName + "&action=purge", id: "ca-purge", addTo: "p-cactions" }); if (whichsite == "hrfw") Y2P.AddPortletItem({ text: "Sysop Alert Button", url: "http://alert.clamburger.org/", id: "n-alertbutton", before: "n-usersguide" }); if (whichsite != "wp") Y2P.AddPortletItem({ text: "Wiki User Wiki", url: "http://www.clamburger.org/wuw/", id: "n-wikilink1.5", before: "n-wikilink2" });

if ($("#ca-edit").get && /^(view|purge)$/i.test(wgAction)) { if ($("#sectionlink-0").get) $("#sectionlink-0").before("edit/"); else $("contentSub").css("display", "block").html(($("contentSub").html ? $("contentSub").html + "\t" : "") + "[edit]"); };

Y2P.ChangeActions({   "nstab-main": "boring fanstuff",    "nstab-user": "stupid parson",    "nstab-project": "don't leave without reading this",    "nstab-template": "it's just a skeleton, crapface",    "nstab-reviews": "be an infamous critic",    "talk": "yap yap yap",    "edit": "vandalise this page",    "viewsource": "can't touch this",    "history": "in 1788, australia was born...",    "move": "got a better commando name?",    "watch": "stalk",    "watching": "adding to list of stalked people...",    "unwatch": "stop stalking",    "unwatching": "removing from list of stalked people...",    "purge": "do not press this"  });

$(".portlet:not(#p-personal, #p-cactions) h5").css("cursor", "default").click(function {   $(this).parent.find("div.pBody").slideToggle("slow");  }).parent.find("div.pBody").hide;

if (wgPageName == "Special:Recentchanges") { window.setInterval(function {     $("#bodyContent ul.special").load(wgScript + "?title=Special:Recentchanges #bodyContent ul.special li");    }, 15000);

if (whichsite != "wp") $("#bodyContent ul.special li").each(function(i) {     $(this.getElementsByTagName("a").filter(function(a) {        return a.class == "new" && new RegExp("^(" + wgServer + ")?" + wgArticlePath.replace("%1", "User_talk:") + "(.*)$", "i").test(a.href);     })).click(function { var prelimresp = $.get(this.href + "?action=submit"); var edittime = prelimresp.responseText.match(/\/)[1]; var edittoken = prelimresp.responseText.match(/\/)[1];       $.post(this.href + "?action=submit", {          "wpEdittime": edittime,          "wpEditToken": escape(edittoken).replace(/\+/g, "%2B"),          "wpTextbox1": "",          "wpSummary": "welcome!",          "wpSection": "",          "wpSave": "Save+page"        });      });    });  };

if (!window.firebug) importScript("http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"); });