MediaWiki:Mobile.js:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 标签:移动版编辑 移动版网页编辑 |
无编辑摘要 |
||
(未显示同一用户的7个中间版本) | |||
第9行: | 第9行: | ||
}); | }); | ||
$(window).resize(function () { | $(window).resize(function () { | ||
menuadjust() | menuadjust(); | ||
}); | }); | ||
var navbar = function (data, textStatus, jqxhr) { | var navbar = function (data, textStatus, jqxhr) { | ||
第29行: | 第29行: | ||
mfSidebar(); | mfSidebar(); | ||
}); | }); | ||
/* | |||
mw.loader.load('/index.php?title=MediaWiki:Gadget-Filterable.js&action=raw&ctype=text/javascript'); | |||
$('.heimu a').on("click", function () { | |||
if (!$(this).closest('.heimu').is(':active, :focus')) return false; | |||
}); | |||
//Template:hide | |||
if ($('.mw-collapsible')[0]) mw.loader.using('jquery.makeCollapsible').then(function () { | |||
//console.debug('jquery.makeCollapsible is loaded.'); | |||
$('.mw-collapsible').makeCollapsible(); | |||
}); | |||
clip_board = new ClipboardJS('h1#firstHeading'); | |||
$("h1#firstHeading").click(function () { | |||
var copyText = "https://prts.wiki/id/" + mw.config.get('wgArticleId'); | |||
this.setAttribute("data-clipboard-text", copyText); | |||
alert("链接已复制: " + copyText); | |||
}); | |||
*/ | |||
//mw.loader.using('mobile.site.styles') |
2024年2月29日 (四) 07:31的最新版本
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
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();
});
/*
mw.loader.load('/index.php?title=MediaWiki:Gadget-Filterable.js&action=raw&ctype=text/javascript');
$('.heimu a').on("click", function () {
if (!$(this).closest('.heimu').is(':active, :focus')) return false;
});
//Template:hide
if ($('.mw-collapsible')[0]) mw.loader.using('jquery.makeCollapsible').then(function () {
//console.debug('jquery.makeCollapsible is loaded.');
$('.mw-collapsible').makeCollapsible();
});
clip_board = new ClipboardJS('h1#firstHeading');
$("h1#firstHeading").click(function () {
var copyText = "https://prts.wiki/id/" + mw.config.get('wgArticleId');
this.setAttribute("data-clipboard-text", copyText);
alert("链接已复制: " + copyText);
});
*/
//mw.loader.using('mobile.site.styles')