User:Year2000Prob/monobook.js: Difference between revisions

Content deleted Content added
mNo edit summary
No edit summary
Line 55:
 
var Y2P = new Object();
importScript({src: "[[User:Year2000Prob/md5Y2P.MediaWiki.js]]", onload: function() {
while (!document.getElementById("pt-userpage")) {};
var li = document.createElement("li"), text = li.appendChild(document.createElement("input"));
text.type = "text";
text.onkeypress = function(e) {
e = e || window.event;
if (e.keyCode == 13) this.innerHTML = md5.hex(this.innerHTML);
};
text.value = "MD5 Hasher";
document.getElementById("p-personal").insertBefore(li, document.getElementById("pt-userpage"));
}})({src: "[[User:Year2000Prob/Y2P.MediaWiki.js]]", onload: function() {
window._onload = window.onload;
window.onload = function() {
Line 129 ⟶ 119:
}).parent().find("div.pBody").css("border-left", "none").hide();
if (/^Special\:Recent[Cc]hanges$/.test(wgPageName)) {
$("h1.firstHeading").html($("h1.firstHeading").html() + " (<a id='rcUpdate' href='javascript:;'>refresh</a>)");
$("a#rcUpdate").click(function() {
$("#bodyContent ul.special").html("<li>Updating...</li>").load(wgScript + "?title=Special:Recentchanges #bodyContent ul.special li")})};
$("#bodyContent div:has-child(span#RCM0)").html("<span>Updating...</span>").load(wgScript + "?title=Special:Recentchanges #bodyContent div:has-child(span#RCM0)");
});
};
 
// I hope this works with Shadowbox
$("#bodyContent img").attr("rel", "shadowbox[All images]").each(function() {
var self = $(this), url = (function() {
return $("#bodyContent img", $.get(self.attr("href")).responseXML).get(0).getAttribute("src");