User:Soxra/monobook.js: Difference between revisions
From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
/* Recent Changes slider - requires jQuery */ | /* Recent Changes slider - requires jQuery */ | ||
$(document).ready(function() { | $(document).ready(function() { | ||
$("input[type='search']").attr("type","text").addClass("input-type-search"); | |||
$(".page-Special_RecentChanges span.mw-changeslist-expanded a, .page-Special_RecentChanges span:not(.mw-changeslist-expanded) a").live("mouseover",function() { | $(".page-Special_RecentChanges span.mw-changeslist-expanded a, .page-Special_RecentChanges span:not(.mw-changeslist-expanded) a").live("mouseover",function() { | ||
$(this).attr("onclick",""); | $(this).attr("onclick",""); |
Revision as of 00:11, 16 January 2012
/* Shrinking talk bubble sprites */
$(document).ready(function() {
if (document.readyState != "complete") {
setTimeout(arguments.callee,100);
return;
}
$("table.talkbubble").each(function() {
$(this).find("td").first().find("img").each(function() {
if ($(this).width() > 90)
$(this).width(90);
});
});
});
/* Recent Changes slider - requires jQuery */
$(document).ready(function() {
$("input[type='search']").attr("type","text").addClass("input-type-search");
$(".page-Special_RecentChanges span.mw-changeslist-expanded a, .page-Special_RecentChanges span:not(.mw-changeslist-expanded) a").live("mouseover",function() {
$(this).attr("onclick","");
}).live("click",function() {
var num = $(this).parent().attr("id").split("-")[3];
var $openarrow = $("#mw-rc-openarrow-"+num);
var $closearrow = $("#mw-rc-closearrow-"+num);
var $subentries = $("#mw-rc-subentries-"+num);
$openarrow.css("visibility","visible").removeClass("mw-changeslist-hidden mw-changeslist-expanded");
$closearrow.css("visibility","visible").removeClass("mw-changeslist-hidden mw-changeslist-expanded");
$subentries.css("visibility","visible").removeClass("mw-changeslist-expanded");
if ($subentries.is(":hidden") || $subentries.hasClass("mw-changeslist-hidden")) {
$openarrow.hide();
$closearrow.show();
$subentries.hide().removeClass("mw-changeslist-hidden").slideDown(300);
} else {
$openarrow.show();
$closearrow.hide();
$subentries.slideUp(300);
}
return false;
});
});