MediaWiki:Common.js:修订间差异
来自Limbo Wiki Mirror
小无编辑摘要 |
小 已从limbowiki:MediaWiki:Common.js导入42个版本 |
||
| (未显示3个用户的4个中间版本) | |||
| 第2行: | 第2行: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("span.mw-summary-preset span.mw-summary-preset-item").click(function(){ | $("span.mw-summary-preset span.mw-summary-preset-item").click(function(){ | ||
$(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary"). | a = $(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").get(0); | ||
a.value += $(this).children().text(); | |||
}); | }); | ||
$(".lw-treebut").click(function(){ | $(".lw-treebut").click(function(){ | ||
$(" | p = $(this).parents(".mw-parser-output").first(); | ||
p.find(".lw-treediv").css("display","none"); | |||
p.find(".lw-treediv." + $(this).attr("id")).css("display","block"); | |||
}); | }); | ||
}); | }); | ||
2025年6月26日 (四) 12:02的最新版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
$(document).ready(function(){
$("span.mw-summary-preset span.mw-summary-preset-item").click(function(){
a = $(this).parents("div.oo-ui-fieldLayout-body").first().find("input#wpSummary").get(0);
a.value += $(this).children().text();
});
$(".lw-treebut").click(function(){
p = $(this).parents(".mw-parser-output").first();
p.find(".lw-treediv").css("display","none");
p.find(".lw-treediv." + $(this).attr("id")).css("display","block");
});
});
