MediaWiki:Mobile.js:修订间差异
imported>=海豚= |
imported>=海豚= 无编辑摘要 |
||
| 第173行: | 第173行: | ||
//页顶提示模板相关 | //页顶提示模板相关 | ||
commonBoxs(); | commonBoxs(); | ||
// Mobile Navmenu | |||
function menuadjust(){var a = $("body").height()+"px";document.getElementById("mw-mf-page-left").style.height = a;}; | |||
$(function(){menuadjust();}); | |||
$(window).resize(function(){menuadjust()}); | |||
var navbar = function(data, textStatus, jqxhr) { | |||
var navlist = data.parse.text["*"]; | |||
$(navlist).insertBefore(".menu > .hlist") | |||
}; | |||
var mfSidebar = function() { | |||
var purl = "/api.php?action=parse&page=MediaWiki:MFSidebar&format=json"; | |||
$.ajax({ | |||
url: purl, | |||
success: navbar, | |||
error: function () {console.error("can\'t load customized navmenu")}, | |||
dataType: "json" | |||
}); | |||
}; | |||
$(function(){mfSidebar();}); | |||
//用户资料页 | //用户资料页 | ||
if (isUserProfile()) { | if (isUserProfile()) { | ||